aboutsummaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-03-15 02:51:03 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-03-15 02:51:03 +0000
commit19e7881c81752c856edb9f71db93805ce0416be6 (patch)
treee937810f6aadde94067b96c8f65cc56fba667d87 /gcc/integrate.c
parentb894530e6d9633fc6497b3c404a3ec1bd1a341df (diff)
downloadgcc-19e7881c81752c856edb9f71db93805ce0416be6.zip
gcc-19e7881c81752c856edb9f71db93805ce0416be6.tar.gz
gcc-19e7881c81752c856edb9f71db93805ce0416be6.tar.bz2
varasm.c (assemble_alias): Use DECL_ASSEMBLER_NAME...
* varasm.c (assemble_alias): Use DECL_ASSEMBLER_NAME, not the contents of the RTL, to determine the name of the object. * tree.h (DECL_RTL): Allocate RTL lazily. (SET_DECL_RTL): New macro. (DECL_RTL_SET_P): Likewise. (COPY_DECL_RTL): Likewise. (DECL_RTL_IF_SET): Likewise. * varasm.c (make_decl_rtl): Add assertions about the kind of declaration we are processing. * c-decl.c (duplicate_decls): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. (start_decl): Likewise. (finish_decl): Likewise. * c-semantics.c (emit_local_var): Likewise. * calls.c (expand_call): Likewise. * dbxout.c (dbxout_symbol): Likewise. * emit-rtl.c (unshare_all_rtl): Likewise. (unshare_all_decls): Likewise. (reset_used_decls): Likewise. * expr.c (store_constructor): Likewise. (safe_from_p): Likewise. (expand_expr): Likewise. * function.c (put_var_into_stack): Likewise. (instantiate_decls_1): Likewise. (assign_parms): Likewise. (expand_function_start): Likewise. (expand_function_end): Likewise. * ggc-common.c (gcc_mark_trees): Likewise. * integrate.c (function_cannot_inline_p): Likewise. (copy_decl_for_inlining): Likewise. (expand_inline_function): Likewise. (integrate_parm_decls): Likewise. (integrate_decl_tree): Likewise. * print-tree.c (print_node): Likewise. * reg-stack.c (stack_result): Likewise. * stmt.c (label_rtx): Likewise. (expand_return): Likewise. (expand_decl): Likewise. (expand_decl_cleanup): Likewise. (expand_anon_union_decl): Likewise. * toplev.c (check_global_declarations): Likewise. (rest_of_decl_compilation): Likewise. * tree.c (simple_cst_equal): Likewise. * objc/objc-act.c (generate_static_references): Likewise. * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. * cp-tree.h (DECL_IN_MEMORY_P): Likewise. * decl.c (duplicate_decls): Likewise. (builtin_function): Likewise. (build_library_fn): Likewise. (build_cp_library_fn): Likewise. (check_initializer): Likewise. (cp_finish_decl): Likewise. * decl2.c (grokfield): Likewise. (grok_function_init): Remove #if 0'd code. (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. * friend.c (do_friend): Likewise. * init.c (get_temp_regvar): Likewise. * method.c (make_thunk): Likewise. * pt.c (tsubst_friend_function): Likewise. (tsubst_decl): Likewise. (regenerate_decl_from_template): Likewise. * semantics.c (genrtl_named_return_value): Likewise. (expand_body): Likewise. (genrtl_finish_function): Likewise. * tree.c (cp_tree_equal): Likewise. * com.c (ffecom_member_phase_2): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. (duplicate_decls): Likewise. (start_decl): Likewise. * class.c (build_static_field_ref): Likewise. (make_method_value): Likewise. (get_dispatch_table): Likewise. * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc. From-SVN: r40482
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 270a9c5..8ce8490 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -137,7 +137,6 @@ function_cannot_inline_p (fndecl)
register int ninsns = 0;
register tree parms;
- rtx result;
if (DECL_UNINLINABLE (fndecl))
return N_("function cannot be inline");
@@ -236,9 +235,12 @@ function_cannot_inline_p (fndecl)
}
/* We can't inline functions that return a PARALLEL rtx. */
- result = DECL_RTL (DECL_RESULT (fndecl));
- if (result && GET_CODE (result) == PARALLEL)
- return N_("inline functions not supported for this return value type");
+ if (DECL_RTL_SET_P (DECL_RESULT (fndecl)))
+ {
+ rtx result = DECL_RTL (DECL_RESULT (fndecl));
+ if (GET_CODE (result) == PARALLEL)
+ return N_("inline functions not supported for this return value type");
+ }
/* If the function has a target specific attribute attached to it,
then we assume that we should not inline it. This can be overriden
@@ -349,7 +351,7 @@ copy_decl_for_inlining (decl, from_fn, to_fn)
DECL_ABSTRACT_ORIGIN (copy) = DECL_ORIGIN (decl);
/* The new variable/label has no RTL, yet. */
- DECL_RTL (copy) = NULL_RTX;
+ SET_DECL_RTL (copy, NULL_RTX);
/* These args would always appear unused, if not for this. */
TREE_USED (copy) = 1;
@@ -952,7 +954,8 @@ expand_inline_function (fndecl, parms, target, ignore, type,
REG_FUNCTION_RETURN_VALUE_P. */
map->inline_target = 0;
- loc = DECL_RTL (DECL_RESULT (fndecl));
+ loc = (DECL_RTL_SET_P (DECL_RESULT (fndecl))
+ ? DECL_RTL (DECL_RESULT (fndecl)) : NULL_RTX);
if (TYPE_MODE (type) == VOIDmode)
/* There is no return value to worry about. */
@@ -1634,7 +1637,7 @@ integrate_parm_decls (args, map, arg_vector)
subst_constants. */
subst_constants (&new_decl_rtl, NULL_RTX, map, 1);
apply_change_group ();
- DECL_RTL (decl) = new_decl_rtl;
+ SET_DECL_RTL (decl, new_decl_rtl);
}
}
@@ -1664,15 +1667,19 @@ integrate_decl_tree (let, map)
d = copy_decl_for_inlining (t, map->fndecl, current_function_decl);
- if (DECL_RTL (t) != 0)
+ if (DECL_RTL_SET_P (t))
{
- DECL_RTL (d) = copy_rtx_and_substitute (DECL_RTL (t), map, 1);
+ rtx r;
+
+ SET_DECL_RTL (d, copy_rtx_and_substitute (DECL_RTL (t), map, 1));
/* Fully instantiate the address with the equivalent form so that the
debugging information contains the actual register, instead of the
virtual register. Do this by not passing an insn to
subst_constants. */
- subst_constants (&DECL_RTL (d), NULL_RTX, map, 1);
+ r = DECL_RTL (d);
+ subst_constants (&r, NULL_RTX, map, 1);
+ SET_DECL_RTL (d, r);
apply_change_group ();
}