aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb.gcc@gmail.com>2006-03-20 21:22:55 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2006-03-20 21:22:55 +0000
commitede497cfbd518c7fafda85bc7b5e26899e5b0f14 (patch)
treecf6c3c48c169fb06b596b3ffc42eb5980f17563d /gcc/function.c
parente13f1c1432140a43edd23a50c3916fa41fadd610 (diff)
downloadgcc-ede497cfbd518c7fafda85bc7b5e26899e5b0f14.zip
gcc-ede497cfbd518c7fafda85bc7b5e26899e5b0f14.tar.gz
gcc-ede497cfbd518c7fafda85bc7b5e26899e5b0f14.tar.bz2
function.h (struct function): Rename to x_stack_check_probe_note.
* function.h (struct function) <x_tail_recursion_reentry>: Rename to x_stack_check_probe_note. (tail_recursion_reentry): Rename to stack_check_probe_note. * function.c: Replace tail_recursion_reentry with stack_check_probe_note everywhere. (expand_function_start): Only emit a note for stack_check_probe_note with -fstack-protect. * stmt.c (expand_case): Don't emit NOTE_INSN_DELETED notes. * emit-rtl.c (remove_unnecessary_notes): Remove. (pass_remove_unnecessary_notes): Remove. * rtl.h (remove_unnecessary_notes): Remove prototype. * final.c (final_start_function): Don't call remove_unnecessary_notes. * tree-pass.h (pass_remove_unnecessary_notes): Remove. * passes.c (pass_remove_unnecessary_notes): Don't run it. From-SVN: r112229
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 988d613..2e9aec0 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -331,7 +331,7 @@ free_after_compilation (struct function *f)
f->x_return_label = NULL;
f->x_naked_return_label = NULL;
f->x_stack_slot_list = NULL;
- f->x_tail_recursion_reentry = NULL;
+ f->x_stack_check_probe_note = NULL;
f->x_arg_pointer_save_area = NULL;
f->x_parm_birth_insn = NULL;
f->original_arg_vector = NULL;
@@ -4224,8 +4224,8 @@ expand_function_start (tree subr)
as opposed to parm setup. */
emit_note (NOTE_INSN_FUNCTION_BEG);
- if (!NOTE_P (get_last_insn ()))
- emit_note (NOTE_INSN_DELETED);
+ gcc_assert (NOTE_P (get_last_insn ()));
+
parm_birth_insn = get_last_insn ();
if (current_function_profile)
@@ -4235,10 +4235,10 @@ expand_function_start (tree subr)
#endif
}
- /* After the display initializations is where the tail-recursion label
- should go, if we end up needing one. Ensure we have a NOTE here
- since some things (like trampolines) get placed before this. */
- tail_recursion_reentry = emit_note (NOTE_INSN_DELETED);
+ /* After the display initializations is where the stack checking
+ probe should go. */
+ if(flag_stack_check)
+ stack_check_probe_note = emit_note (NOTE_INSN_DELETED);
/* Make sure there is a line number after the function entry setup code. */
force_next_line_note ();
@@ -4364,7 +4364,7 @@ expand_function_end (void)
GEN_INT (STACK_CHECK_MAX_FRAME_SIZE));
seq = get_insns ();
end_sequence ();
- emit_insn_before (seq, tail_recursion_reentry);
+ emit_insn_before (seq, stack_check_probe_note);
break;
}
}