From 78e0d62b95e1706a1243f3067da2e487c2d4a7e9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 31 Dec 2004 17:43:12 -0800 Subject: re PR middle-end/17799 (Non-optimizing compile loses 'this') PR middle-end/17799 * function.c (use_register_for_decl): Check DECL_IGNORED_P instead of DECL_ARTIFICIAL. (assign_parms_augmented_arg_list): Set DECL_IGNORED_P. * c-decl.c (build_compound_literal): Likewise. * dwarf2asm.c (dw2_force_const_mem): Likewise. * gimplify.c (create_artificial_label): Likewise. * tree-inline.c (expand_call_inline): Likewise. * var-tracking.c (vt_initialize): Likewise. * tree-outof-ssa.c (create_temp): Copy DECL_IGNORED_P. cp/ * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P. * class.c (build_vtable): Don't conditionallize setting it based on DWARF2_DEBUG. (layout_class_type): Set DECL_IGNORED_P. * decl2.c (get_guard): Likewise. * rtti.c (get_tinfo_decl, build_lang_decl): Likewise. * tree.c (build_local_temp): Likewise. From-SVN: r92781 --- gcc/function.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index eb1e14e..e878dc1 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1922,8 +1922,9 @@ use_register_for_decl (tree decl) if (flag_float_store && FLOAT_TYPE_P (TREE_TYPE (decl))) return false; - /* Compiler-generated temporaries can always go in registers. */ - if (DECL_ARTIFICIAL (decl)) + /* If we're not interested in tracking debugging information for + this decl, then we can certainly put it in a register. */ + if (DECL_IGNORED_P (decl)) return true; return (optimize || DECL_REGISTER (decl)); @@ -2105,6 +2106,7 @@ assign_parms_augmented_arg_list (struct assign_parm_data_all *all) decl = build_decl (PARM_DECL, NULL_TREE, type); DECL_ARG_TYPE (decl) = type; DECL_ARTIFICIAL (decl) = 1; + DECL_IGNORED_P (decl) = 1; TREE_CHAIN (decl) = fnargs; fnargs = decl; -- cgit v1.1