summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 22:12:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 22:12:25 +0000
commitd78f98117af9c15a9f03af2bba3d9e90bb3aa1d5 (patch)
tree4d0c8406f85599c9b42c04accb8155e69bd0ddb3 /gcc
parente5cd32627a10b60a545c26cda2f7d8d2ae112a3b (diff)
downloadgcc-d78f98117af9c15a9f03af2bba3d9e90bb3aa1d5.tar.gz
PR bootstrap/43121
* except.c (sjlj_emit_function_enter): Don't call add_reg_br_prob_note, instead add REG_BR_PROB note to the last insn directly. * rtl.h (add_reg_br_prob_note): Remove prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156913 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/except.c11
-rw-r--r--gcc/rtl.h4
3 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f4a916b93d8..168efd014b4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/43121
+ * except.c (sjlj_emit_function_enter): Don't call
+ add_reg_br_prob_note, instead add REG_BR_PROB note to the last insn
+ directly.
+ * rtl.h (add_reg_br_prob_note): Remove prototype.
+
2010-02-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 41779
diff --git a/gcc/except.c b/gcc/except.c
index 10b547dcf3c..8012d781834 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1,6 +1,6 @@
/* Implements exception handling.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Mike Stump <mrs@cygnus.com>.
@@ -1154,7 +1154,7 @@ sjlj_emit_function_enter (rtx dispatch_label)
#ifdef DONT_USE_BUILTIN_SETJMP
{
- rtx x;
+ rtx x, last;
x = emit_library_call_value (setjmp_libfunc, NULL_RTX, LCT_RETURNS_TWICE,
TYPE_MODE (integer_type_node), 1,
plus_constant (XEXP (fc, 0),
@@ -1162,7 +1162,12 @@ sjlj_emit_function_enter (rtx dispatch_label)
emit_cmp_and_jump_insns (x, const0_rtx, NE, 0,
TYPE_MODE (integer_type_node), 0, dispatch_label);
- add_reg_br_prob_note (get_insns (), REG_BR_PROB_BASE/100);
+ last = get_last_insn ();
+ if (JUMP_P (last) && any_condjump_p (last))
+ {
+ gcc_assert (!find_reg_note (last, REG_BR_PROB, 0));
+ add_reg_note (last, REG_BR_PROB, GEN_INT (REG_BR_PROB_BASE / 100));
+ }
}
#else
expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs),
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 960237cec53..1748e738527 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1,6 +1,6 @@
/* Register Transfer Language (RTL) definitions for GCC
Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
@@ -2418,8 +2418,6 @@ extern GTY(()) rtx stack_limit_rtx;
/* In predict.c */
extern void invert_br_probabilities (rtx);
extern bool expensive_function_p (int);
-/* In cfgexpand.c */
-extern void add_reg_br_prob_note (rtx last, int probability);
/* In var-tracking.c */
extern unsigned int variable_tracking_main (void);