diff options
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/gcc/function.c b/gcc/function.c index f625489205b..62e72eb2a9f 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2218,20 +2218,11 @@ use_register_for_decl (const_tree decl) if (!DECL_REGISTER (decl)) return false; - switch (TREE_CODE (TREE_TYPE (decl))) - { - case RECORD_TYPE: - case UNION_TYPE: - case QUAL_UNION_TYPE: - /* When not optimizing, disregard register keyword for variables with - types containing methods, otherwise the methods won't be callable - from the debugger. */ - if (TYPE_METHODS (TYPE_MAIN_VARIANT (TREE_TYPE (decl)))) - return false; - break; - default: - break; - } + /* When not optimizing, disregard register keyword for types that + could have methods, otherwise the methods won't be callable from + the debugger. */ + if (RECORD_OR_UNION_TYPE_P (TREE_TYPE (decl))) + return false; return true; } @@ -5263,6 +5254,16 @@ expand_function_start (tree subr) } } + /* The following was moved from init_function_start. + The move is supposed to make sdb output more accurate. */ + /* Indicate the beginning of the function body, + as opposed to parm setup. */ + emit_note (NOTE_INSN_FUNCTION_BEG); + + gcc_assert (NOTE_P (get_last_insn ())); + + parm_birth_insn = get_last_insn (); + /* If the function receives a non-local goto, then store the bits we need to restore the frame pointer. */ if (cfun->nonlocal_goto_save_area) @@ -5284,16 +5285,6 @@ expand_function_start (tree subr) update_nonlocal_goto_save_area (); } - /* The following was moved from init_function_start. - The move is supposed to make sdb output more accurate. */ - /* Indicate the beginning of the function body, - as opposed to parm setup. */ - emit_note (NOTE_INSN_FUNCTION_BEG); - - gcc_assert (NOTE_P (get_last_insn ())); - - parm_birth_insn = get_last_insn (); - if (crtl->profile) { #ifdef PROFILE_HOOK |