#include "stor-layout.h"
#include "attribs.h"
#include "function.h"
+#include "gimple-expr.h"
#include "d-tree.h"
tree
force_target_expr (tree exp)
{
- tree decl = build_decl (input_location, VAR_DECL, NULL_TREE,
- TREE_TYPE (exp));
+ tree decl = create_tmp_var_raw (TREE_TYPE (exp));
DECL_CONTEXT (decl) = current_function_decl;
- DECL_ARTIFICIAL (decl) = 1;
- DECL_IGNORED_P (decl) = 1;
layout_decl (decl, 0);
return build_target_expr (decl, exp);
#include "alloc-pool.h"
#include "symbol-summary.h"
#include "symtab-thunks.h"
+#include "gimple-expr.h"
#include "d-tree.h"
#include "d-target.h"
tree
build_local_temp (tree type)
{
- tree decl = build_decl (input_location, VAR_DECL, NULL_TREE, type);
-
- DECL_CONTEXT (decl) = current_function_decl;
- DECL_ARTIFICIAL (decl) = 1;
- DECL_IGNORED_P (decl) = 1;
+ tree decl = create_tmp_var_raw (type);
d_pushdecl (decl);
return decl;
count = CALL_EXPR_ARG (callexp, 1);
else
{
- tree callee = CALL_EXPR_FN (callexp);
-
- if (TREE_CODE (callee) == ADDR_EXPR)
- callee = TREE_OPERAND (callee, 0);
-
/* Retrieve from the encoded template instantation. */
+ tree callee = get_callee_fndecl (callexp);
TemplateInstance *ti = DECL_LANG_FRONTEND (callee)->isInstantiated ();
gcc_assert (ti && ti->tiargs && ti->tiargs->length == 2);
tree
maybe_expand_intrinsic (tree callexp)
{
- tree callee = CALL_EXPR_FN (callexp);
-
- if (TREE_CODE (callee) == ADDR_EXPR)
- callee = TREE_OPERAND (callee, 0);
+ tree callee = get_callee_fndecl (callexp);
- if (TREE_CODE (callee) != FUNCTION_DECL)
+ if (callee == NULL_TREE || TREE_CODE (callee) != FUNCTION_DECL)
return callexp;
/* Don't expand CTFE-only intrinsics outside of semantic processing. */