diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-15 02:51:03 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-15 02:51:03 +0000 |
commit | 0e8e37b2e8d034c84c53890b9b186bd8121804a5 (patch) | |
tree | e937810f6aadde94067b96c8f65cc56fba667d87 /gcc/tree.h | |
parent | ad5a392a1bda8db116d15f3ee09d282d956141a9 (diff) | |
download | ppe42-gcc-0e8e37b2e8d034c84c53890b9b186bd8121804a5.tar.gz ppe42-gcc-0e8e37b2e8d034c84c53890b9b186bd8121804a5.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40482 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gcc/tree.h b/gcc/tree.h index 4ec4321663a..55e19c0afc8 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1341,8 +1341,27 @@ struct tree_type PROMOTED_MODE is defined, the mode of this expression may not be same as DECL_MODE. In that case, DECL_MODE contains the mode corresponding to the variable's data type, while the mode - of DECL_RTL is the mode actually used to contain the data. */ -#define DECL_RTL(NODE) (DECL_CHECK (NODE)->decl.rtl) + of DECL_RTL is the mode actually used to contain the data. + + This value can be evaluated lazily for functions, variables with + static storage duration, and labels. */ +#define DECL_RTL(NODE) \ + (DECL_CHECK (NODE)->decl.rtl \ + ? (NODE)->decl.rtl \ + : (make_decl_rtl (NODE, NULL), (NODE)->decl.rtl)) +/* Set the DECL_RTL for NODE to RTL. */ +#define SET_DECL_RTL(NODE, RTL) \ + (DECL_CHECK (NODE)->decl.rtl = (RTL)) +/* Returns non-zero if the DECL_RTL for NODE has already been set. */ +#define DECL_RTL_SET_P(NODE) \ + (DECL_CHECK (NODE)->decl.rtl != NULL) +/* Copy the RTL from NODE1 to NODE2. If the RTL was not set for + NODE1, it will not be set for NODE2; this is a lazy copy. */ +#define COPY_DECL_RTL(NODE1, NODE2) \ + (DECL_CHECK (NODE2)->decl.rtl = DECL_CHECK (NODE1)->decl.rtl) +/* The DECL_RTL for NODE, if it is set, or NULL, if it is not set. */ +#define DECL_RTL_IF_SET(NODE) \ + (DECL_RTL_SET_P (NODE) ? DECL_RTL (NODE) : NULL) /* Holds an INSN_LIST of all of the live ranges in which the variable has been moved to a possibly different register. */ #define DECL_LIVE_RANGE_RTL(NODE) (DECL_CHECK (NODE)->decl.live_range_rtl) |