t = build_vl_exp (CALL_EXPR, gimple_call_num_args (stmt) + 3);
- fn = gimple_call_fn (stmt);
- if (TREE_CODE (fn) == FUNCTION_DECL)
- CALL_EXPR_FN (t) = build1 (ADDR_EXPR,
- build_pointer_type (TREE_TYPE (fn)),
- fn);
- else
- CALL_EXPR_FN (t) = fn;
-
+ CALL_EXPR_FN (t) = gimple_call_fn (stmt);
TREE_TYPE (t) = gimple_call_return_type (stmt);
-
CALL_EXPR_STATIC_CHAIN (t) = gimple_call_chain (stmt);
for (i = 0; i < gimple_call_num_args (stmt); i++)
/* Record the original call statement, as it may be used
to retrieve profile information during expansion. */
- if (TREE_CODE (fn) == FUNCTION_DECL && DECL_BUILT_IN (fn))
+
+ if ((fn = gimple_call_fndecl (stmt)) != NULL_TREE
+ && DECL_BUILT_IN (fn))
{
ann = get_tree_common_ann (t);
ann->stmt = stmt;
case GIMPLE_CALL:
if (gimple_call_lhs (stmt))
{
- if (TREE_CODE (gimple_call_fn (stmt)) == FUNCTION_DECL)
- ggc_free (CALL_EXPR_FN (TREE_OPERAND (stmt_tree, 1)));
ann = tree_common_ann (TREE_OPERAND (stmt_tree, 1));
if (ann)
ggc_free (ann);
ggc_free (TREE_OPERAND (stmt_tree, 1));
}
- else if (TREE_CODE (gimple_call_fn (stmt)) == FUNCTION_DECL)
- ggc_free (CALL_EXPR_FN (stmt_tree));
break;
default:
break;
insn_locators_alloc ();
if (!DECL_BUILT_IN (current_function_decl))
- set_curr_insn_source_location (DECL_SOURCE_LOCATION (current_function_decl));
+ {
+ /* Eventually, all FEs should explicitly set function_start_locus. */
+ if (cfun->function_start_locus == UNKNOWN_LOCATION)
+ set_curr_insn_source_location
+ (DECL_SOURCE_LOCATION (current_function_decl));
+ else
+ set_curr_insn_source_location (cfun->function_start_locus);
+ }
set_curr_insn_block (DECL_INITIAL (current_function_decl));
prologue_locator = curr_insn_locator ();