rpms/gcc/devel gcc41-power6.patch, NONE, 1.1 gcc41-pr28370.patch, NONE, 1.1 gcc41-pr28390.patch, NONE, 1.1 gcc41-reassoc1.patch, NONE, 1.1 gcc41-reassoc2.patch, NONE, 1.1 gcc41-reassoc3.patch, NONE, 1.1 gcc41-reassoc4.patch, NONE, 1.1 gcc41-reassoc5.patch, NONE, 1.1 gcc41.spec, 1.79, 1.80
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sat Jul 15 21:13:22 UTC 2006
- Previous message (by thread): rpms/libuser/FC-4 libuser-0.53.7-double-free.patch, NONE, 1.1 libuser-0.53.7-enumerate.patch, NONE, 1.1 libuser-0.53.7-lpasswd.patch, NONE, 1.1 libuser.spec, 1.38, 1.39
- Next message (by thread): rpms/kernel/FC-5 linux-2.6-defaults-disable-split-ptlock.patch, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jakub
Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21483
Modified Files:
gcc41.spec
Added Files:
gcc41-power6.patch gcc41-pr28370.patch gcc41-pr28390.patch
gcc41-reassoc1.patch gcc41-reassoc2.patch gcc41-reassoc3.patch
gcc41-reassoc4.patch gcc41-reassoc5.patch
Log Message:
4.1.1-8
gcc41-power6.patch:
config.in | 2427 ++++++++++++++++++++++++++++++++++++++++++++++++++------------
configure | 46 +
2 files changed, 2020 insertions(+), 453 deletions(-)
--- NEW FILE gcc41-power6.patch ---
2006-07-12 Pete Steinmetz <steinmtz at us.ibm.com>
Peter Bergner <bergner at vnet.ibm.com>
* doc/invoke.texi (RS/6000 and PowerPC Options): Add -mmfpgpr.
* recog.c (store_data_bypass_p): Add support to allow IN_INSN to
be a PARALLEL containing sets. Return false when out_pat is not
a PARALLEL insn.
* configure.ac: Add test for mf{t,f}gpr instructions.
(HAVE_AS_MFPGPR): New.
* configure: Regenerate.
* config.in: Regenerate.
* config/rs6000/linux64.h (PROCESSOR_DEFAULT): Default to POWER6.
(PROCESSOR_DEFAULT64): Likewise.
* config/rs6000/rs6000.md (define_attr "type"): Add insert_dword,
shift,trap,var_shift_rotate,cntlz,exts, var_delayed_compare, mffgpr
and mftgpr attributes.
(define_attr "cpu"): Add power6.
Change instruction sequences to use new attributes.
(floatsidf2,fix_truncdfsi2): use TARGET_MFPGPR.
(fix_truncdfsi2_internal_mfpgpr): New.
(floatsidf_ppc64_mfpgpr): New.
(floatsidf_ppc64): Added !TARGET_MFPGPR condition.
(movdf_hardfloat64_mfpgpr,movdi_internal64_mfpgpr): New.
(movdf_hardfloat64): Added !TARGET_MFPGPR condition.
(movdi_internal64): Added !TARGET_MFPGPR and related conditions.
* config/rs6000/{6xx.md,power4.md,8540.md,603.md,mpc.md,
7xx.md,rios2.md,7450.md,440.md,rios1.md,rs64.md,power5.md,40x.md}:
Add descriptions for insert_dword, shift,trap,var_shift_rotate,
cntlz,exts and var_delayed_compare.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
_ARCH_PWR6, if features enabled.
* config/rs6000/rs6000.opt (mmfpgpr): New.
* config/rs6000/rs6000.c (rs6000_align_branch_targets): New variable.
(cached_can_issue_more): New variable.
(processor_costs): Add power6_cost.
(rs6000_sched_init): New function.
(is_dispatch_slot_restricted): Deleted.
(set_to_load_agen): New function.
(is_load_insn,is_store_insn): New functions.
(adjacent_mem_locations): New function.
(insn_must_be_first_in_group): New function.
(insn_must_be_last_in_group): New function.
(rs6000_sched_reorder): New function.
(rs6000_sched_reorder2): New function.
(TARGET_SCHED_INIT,TARGET_SCHED_REORDER,
TARGET_SCHED_REORDER2): Define.
(processor_target_table): Use PROCESSOR_POWER6 for power6,
Add MASK_MFPGPR for power6.
(POWERPC_MASKS): Add MASK_MFPGPR.
(rs6000_override_options): Set rs6000_always_hint to false
for power6. Set rs6000_align_branch_targets. Replace
rs6000_sched_groups check with rs6000_align_branch_targets.
Use PROCESSOR_POWER6.
(last_scheduled_insn): New variable.
(load_store_pendulum): New variable.
(rs6000_variable_issue): Set last_scheduled_insn and
cached_can_issue_more.
(rs6000_adjust_cost): Add power6 cost adjustments.
(rs6000_adjust_priority): Replace is_dispatch_slot_restricted
with insn_must_be_first_in_group. Add power6 priority adjustments.
(rs6000_issue_rate): Add CPU_POWER6.
(insn_terminates_group_p): Use insn_must_be_{first,last}_in_group.
(rs6000_register_move_cost): Adjust rs6000_memory_move_cost if
mf{t,f}gpr are available.
* config/rs6000/rs6000.h (processor_type): Add PROCESSOR_POWER6.
(TARGET_MFPGPR): New.
(SECONDARY_MEMORY_NEEDED): Use TARGET_MFPGPR.
* config/rs6000/power6.md: New file.
--- gcc/doc/invoke.texi (revision 115324)
+++ gcc/doc/invoke.texi (working copy)
@@ -637,6 +637,7 @@ See RS/6000 and PowerPC Options.
-mpowerpc-gpopt -mno-powerpc-gpopt @gol
-mpowerpc-gfxopt -mno-powerpc-gfxopt @gol
-mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb -mfprnd -mno-fprnd @gol
+-mmfpgpr -mno-mfpgpr @gol
-mnew-mnemonics -mold-mnemonics @gol
-mfull-toc -mminimal-toc -mno-fp-in-toc -mno-sum-in-toc @gol
-m64 -m32 -mxl-compat -mno-xl-compat -mpe @gol
@@ -10869,6 +10870,8 @@ These @samp{-m} options are defined for
@itemx -mno-popcntb
@itemx -mfprnd
@itemx -mno-fprnd
+ at itemx -mmfpgpr
+ at itemx -mno-mfpgpr
@opindex mpower
@opindex mno-power
@opindex mpower2
@@ -10887,6 +10890,8 @@ These @samp{-m} options are defined for
@opindex mno-popcntb
@opindex mfprnd
@opindex mno-fprnd
+ at opindex mmfpgpr
+ at opindex mno-mfpgpr
GCC supports two related instruction set architectures for the
RS/6000 and PowerPC at . The @dfn{POWER} instruction set are those
instructions supported by the @samp{rios} chip set used in the original
@@ -10931,6 +10936,10 @@ architecture.
The @option{-mfprnd} option allows GCC to generate the FP round to
integer instructions implemented on the POWER5+ processor and other
processors that support the PowerPC V2.03 architecture.
+The @option{-mfpgpr} option allows GCC to generate the FP move to/from
+general purpose register instructions implemented on the POWER6
+processor and other processors that support the PowerPC V2.05
+architecture.
The @option{-mpowerpc64} option allows GCC to generate the additional
64-bit instructions that are found in the full PowerPC64 architecture
@@ -10997,10 +11006,10 @@ following options: @option{-maltivec}, @
@option{-mhard-float}, @option{-mmfcrf}, @option{-mmultiple},
@option{-mnew-mnemonics}, @option{-mpopcntb}, @option{-mpower},
@option{-mpower2}, @option{-mpowerpc64}, @option{-mpowerpc-gpopt},
- at option{-mpowerpc-gfxopt}, @option{-mstring}. The particular options
-set for any particular CPU will vary between compiler versions,
-depending on what setting seems to produce optimal code for that CPU;
-it doesn't necessarily reflect the actual hardware's capabilities. If
+ at option{-mpowerpc-gfxopt}, @option{-mstring}, @option{-mmfpgpr}. The
+particular options set for any particular CPU will vary between compiler
+versions, depending on what setting seems to produce optimal code for that
+CPU; it doesn't necessarily reflect the actual hardware's capabilities. If
you wish to set an individual option to a particular value, you may
specify it after the @option{-mcpu} option, like @samp{-mcpu=970
-mno-altivec}.
--- gcc/recog.c (revision 115324)
+++ gcc/recog.c (working copy)
@@ -3359,47 +3359,92 @@
/* Common predicates for use with define_bypass. */
/* True if the dependency between OUT_INSN and IN_INSN is on the store
- data not the address operand(s) of the store. IN_INSN must be
- single_set. OUT_INSN must be either a single_set or a PARALLEL with
- SETs inside. */
+ data not the address operand(s) of the store. IN_INSN and OUT_INSN
+ must be either a single_set or a PARALLEL with SETs inside. */
int
store_data_bypass_p (rtx out_insn, rtx in_insn)
{
rtx out_set, in_set;
+ rtx out_pat, in_pat;
+ rtx out_exp, in_exp;
+ int i, j;
in_set = single_set (in_insn);
- gcc_assert (in_set);
+ if (in_set)
+ {
+ if (!MEM_P (SET_DEST (in_set)))
+ return false;
- if (!MEM_P (SET_DEST (in_set)))
- return false;
+ out_set = single_set (out_insn);
+ if (out_set)
+ {
+ if (reg_mentioned_p (SET_DEST (out_set), SET_DEST (in_set)))
+ return false;
+ }
+ else
+ {
+ out_pat = PATTERN (out_insn);
- out_set = single_set (out_insn);
- if (out_set)
- {
- if (reg_mentioned_p (SET_DEST (out_set), SET_DEST (in_set)))
- return false;
+ if (GET_CODE (out_pat) != PARALLEL)
+ return false;
+
+ for (i = 0; i < XVECLEN (out_pat, 0); i++)
+ {
+ out_exp = XVECEXP (out_pat, 0, i);
+
+ if (GET_CODE (out_exp) == CLOBBER)
+ continue;
+
+ gcc_assert (GET_CODE (out_exp) == SET);
+
+ if (reg_mentioned_p (SET_DEST (out_exp), SET_DEST (in_set)))
+ return false;
+ }
+ }
}
else
{
- rtx out_pat;
- int i;
+ in_pat = PATTERN (in_insn);
+ gcc_assert (GET_CODE (in_pat) == PARALLEL);
- out_pat = PATTERN (out_insn);
- gcc_assert (GET_CODE (out_pat) == PARALLEL);
-
- for (i = 0; i < XVECLEN (out_pat, 0); i++)
+ for (i = 0; i < XVECLEN (in_pat, 0); i++)
{
- rtx exp = XVECEXP (out_pat, 0, i);
+ in_exp = XVECEXP (in_pat, 0, i);
[...3447 lines suppressed...]
- [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
- (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r")
- (match_operand:SI 2 "reg_or_cint_operand" "ri")))]
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
+ (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r")
+ (match_operand:SI 2 "reg_or_cint_operand" "r,i")))]
"TARGET_POWERPC64"
- "srad%I2 %0,%1,%H2")
+ "@
+ srad %0,%1,%2
+ sradi %0,%1,%H2"
+ [(set_attr "type" "var_shift_rotate,shift")])
(define_insn "*ashrdi3_internal2"
- [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")
- (compare:CC (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r")
- (match_operand:SI 2 "reg_or_cint_operand" "ri,ri"))
+ [(set (match_operand:CC 0 "cc_reg_operand" "=x,x,?y,?y")
+ (compare:CC (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r,r,r")
+ (match_operand:SI 2 "reg_or_cint_operand" "r,i,r,i"))
(const_int 0)))
- (clobber (match_scratch:DI 3 "=r,r"))]
+ (clobber (match_scratch:DI 3 "=r,r,r,r"))]
"TARGET_64BIT"
"@
- srad%I2. %3,%1,%H2
+ srad. %3,%1,%2
+ sradi. %3,%1,%H2
+ #
#"
- [(set_attr "type" "delayed_compare")
- (set_attr "length" "4,8")])
+ [(set_attr "type" "var_delayed_compare,delayed_compare,var_delayed_compare,delayed_compare")
+ (set_attr "length" "4,4,8,8")])
(define_split
[(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")
@@ -6715,18 +6868,20 @@
"")
(define_insn "*ashrdi3_internal3"
- [(set (match_operand:CC 3 "cc_reg_operand" "=x,?y")
- (compare:CC (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r")
- (match_operand:SI 2 "reg_or_cint_operand" "ri,ri"))
+ [(set (match_operand:CC 3 "cc_reg_operand" "=x,x,?y,?y")
+ (compare:CC (ashiftrt:DI (match_operand:DI 1 "gpc_reg_operand" "r,r,r,r")
+ (match_operand:SI 2 "reg_or_cint_operand" "r,i,r,i"))
(const_int 0)))
- (set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
+ (set (match_operand:DI 0 "gpc_reg_operand" "=r,r,r,r")
(ashiftrt:DI (match_dup 1) (match_dup 2)))]
"TARGET_64BIT"
"@
- srad%I2. %0,%1,%H2
+ srad. %0,%1,%2
+ sradi. %0,%1,%H2
+ #
#"
- [(set_attr "type" "delayed_compare")
- (set_attr "length" "4,8")])
+ [(set_attr "type" "var_delayed_compare,delayed_compare,var_delayed_compare,delayed_compare")
+ (set_attr "length" "4,4,8,8")])
(define_split
[(set (match_operand:CC 3 "cc_reg_not_cr0_operand" "")
@@ -6801,7 +6956,7 @@
#
#
#"
- [(set_attr "type" "compare,compare,compare,compare,compare,compare,compare,compare,compare,compare,compare,compare")
+ [(set_attr "type" "compare,compare,delayed_compare,compare,compare,compare,compare,compare,compare,compare,compare,compare")
(set_attr "length" "4,4,4,4,4,8,8,8,8,8,8,12")])
(define_split
@@ -6852,7 +7007,7 @@
#
#
#"
- [(set_attr "type" "compare,compare,compare,compare,compare,compare,compare,compare,compare,compare,compare,compare")
+ [(set_attr "type" "compare,compare,delayed_compare,compare,compare,compare,compare,compare,compare,compare,compare,compare")
(set_attr "length" "4,4,4,4,4,8,8,8,8,8,8,12")])
(define_split
@@ -7742,10 +7897,36 @@
; ld/std require word-aligned displacements -> 'Y' constraint.
; List Y->r and r->Y before r->r for reload.
+(define_insn "*movdf_hardfloat64_mfpgpr"
+ [(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r,r,f")
+ (match_operand:DF 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F,f,r"))]
+ "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
+ && (gpc_reg_operand (operands[0], DFmode)
+ || gpc_reg_operand (operands[1], DFmode))"
+ "@
+ std%U0%X0 %1,%0
+ ld%U1%X1 %0,%1
+ mr %0,%1
+ fmr %0,%1
+ lfd%U1%X1 %0,%1
+ stfd%U0%X0 %1,%0
+ mt%0 %1
+ mf%1 %0
+ {cror 0,0,0|nop}
+ #
+ #
+ #
+ mftgpr %0,%1
+ mffgpr %0,%1"
+ [(set_attr "type" "store,load,*,fp,fpload,fpstore,mtjmpr,mfjmpr,*,*,*,*,mftgpr,mffgpr")
+ (set_attr "length" "4,4,4,4,4,4,4,4,4,8,12,16,4,4")])
+
+; ld/std require word-aligned displacements -> 'Y' constraint.
+; List Y->r and r->Y before r->r for reload.
(define_insn "*movdf_hardfloat64"
[(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r")
(match_operand:DF 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F"))]
- "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS
+ "TARGET_POWERPC64 && !TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
&& (gpc_reg_operand (operands[0], DFmode)
|| gpc_reg_operand (operands[1], DFmode))"
"@
@@ -8060,10 +8241,35 @@
[(pc)]
{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; })
+(define_insn "*movdi_internal64_mfpgpr"
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,*f,*f,m,r,*h,*h,r,*f")
+ (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0,*f,r"))]
+ "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS
+ && (gpc_reg_operand (operands[0], DImode)
+ || gpc_reg_operand (operands[1], DImode))"
+ "@
+ mr %0,%1
+ ld%U1%X1 %0,%1
+ std%U0%X0 %1,%0
+ li %0,%1
+ lis %0,%v1
+ #
+ {cal|la} %0,%a1
+ fmr %0,%1
+ lfd%U1%X1 %0,%1
+ stfd%U0%X0 %1,%0
+ mf%1 %0
+ mt%0 %1
+ {cror 0,0,0|nop}
+ mftgpr %0,%1
+ mffgpr %0,%1"
+ [(set_attr "type" "*,load,store,*,*,*,*,fp,fpload,fpstore,mfjmpr,mtjmpr,*,mftgpr,mffgpr")
+ (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4")])
+
(define_insn "*movdi_internal64"
[(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,*f,*f,m,r,*h,*h")
(match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))]
- "TARGET_POWERPC64
+ "TARGET_POWERPC64 && (!TARGET_MFPGPR || !TARGET_HARD_FLOAT || !TARGET_FPRS)
&& (gpc_reg_operand (operands[0], DImode)
|| gpc_reg_operand (operands[1], DImode))"
"@
@@ -13441,7 +13647,8 @@
(define_insn "trap"
[(trap_if (const_int 1) (const_int 0))]
""
- "{t 31,0,0|trap}")
+ "{t 31,0,0|trap}"
+ [(set_attr "type" "trap")])
(define_expand "conditional_trap"
[(trap_if (match_operator 0 "trap_comparison_operator"
@@ -13458,7 +13665,8 @@
(match_operand:GPR 2 "reg_or_short_operand" "rI")])
(const_int 0))]
""
- "{t|t<wd>}%V0%I2 %1,%2")
+ "{t|t<wd>}%V0%I2 %1,%2"
+ [(set_attr "type" "trap")])
;; Insns related to generating the function prologue and epilogue.
--- gcc/config/rs6000/40x.md (revision 115324)
+++ gcc/config/rs6000/40x.md (working copy)
@@ -38,7 +38,8 @@
"iu_40x")
(define_insn_reservation "ppc403-integer" 1
- (and (eq_attr "type" "integer,insert_word")
+ (and (eq_attr "type" "integer,insert_word,insert_dword,shift,trap,\
+ var_shift_rotate,cntlz,exts")
(eq_attr "cpu" "ppc403,ppc405"))
"iu_40x")
@@ -53,7 +54,8 @@
"iu_40x,iu_40x,iu_40x")
(define_insn_reservation "ppc403-compare" 3
- (and (eq_attr "type" "cmp,fast_compare,compare,delayed_compare")
+ (and (eq_attr "type" "cmp,fast_compare,compare,delayed_compare,\
+ var_delayed_compare")
(eq_attr "cpu" "ppc403,ppc405"))
"iu_40x,nothing,bpu_40x")
gcc41-pr28370.patch:
cp/decl2.c | 12 ++----------
testsuite/g++.dg/template/anon3.C | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 10 deletions(-)
--- NEW FILE gcc41-pr28370.patch ---
2006-07-15 Jakub Jelinek <jakub at redhat.com>
PR c++/28370
* decl2.c (note_vague_linkage_var): Removed.
(finish_static_data_member_decl): Add decl to pending_statics vector
directly. Do it even for non-public decls.
* g++.dg/template/anon3.C: New test.
--- gcc/cp/decl2.c.jj 2006-07-11 11:21:20.000000000 +0200
+++ gcc/cp/decl2.c 2006-07-13 18:39:59.000000000 +0200
@@ -696,14 +696,6 @@ note_vague_linkage_fn (tree decl)
}
}
-/* Like note_vague_linkage_fn but for variables. */
-
-static void
-note_vague_linkage_var (tree var)
-{
- VEC_safe_push (tree, gc, pending_statics, var);
-}
-
/* We have just processed the DECL, which is a static data member.
The other parameters are as for cp_finish_decl. */
@@ -719,8 +711,8 @@ finish_static_data_member_decl (tree dec
TREE_CHAIN of our decl. Instead, we modify cp_finish_decl to do
the right thing, namely, to put this decl out straight away. */
- if (! processing_template_decl && TREE_PUBLIC (decl))
- note_vague_linkage_var (decl);
+ if (! processing_template_decl)
+ VEC_safe_push (tree, gc, pending_statics, decl);
if (LOCAL_CLASS_P (current_class_type))
pedwarn ("local class %q#T shall not have static data member %q#D",
--- gcc/testsuite/g++.dg/template/anon3.C.jj 2006-07-13 15:36:40.709347500 +0200
+++ gcc/testsuite/g++.dg/template/anon3.C 2006-07-13 18:47:58.000000000 +0200
@@ -0,0 +1,20 @@
+// PR c++/28370
+// { dg-do run }
+
+namespace
+{
+ template<typename T> struct A { static int *a; };
+ template<typename T> int *A<T>::a = 0;
+}
+
+int *
+foo ()
+{
+ return A<int>::a;
+}
+
+int
+main ()
+{
+ return foo() != 0;
+}
gcc41-pr28390.patch:
gcc/fortran/trans-openmp.c | 5 +++--
libgomp/testsuite/libgomp.fortran/pr28390.f | 8 ++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
--- NEW FILE gcc41-pr28390.patch ---
2006-07-15 Jakub Jelinek <jakub at redhat.com>
PR fortran/28390
* trans-openmp.c (gfc_trans_omp_do): Look for LASTPRIVATE in
code->exp.omp_clauses rather than in the 3rd function argument.
* testsuite/libgomp.fortran/pr28390.f: New test.
--- gcc/fortran/trans-openmp.c.jj 2006-06-09 23:14:16.000000000 +0200
+++ gcc/fortran/trans-openmp.c 2006-07-15 16:26:27.000000000 +0200
@@ -888,7 +888,7 @@ gfc_trans_omp_critical (gfc_code *code)
static tree
gfc_trans_omp_do (gfc_code *code, stmtblock_t *pblock,
- gfc_omp_clauses *clauses)
+ gfc_omp_clauses *do_clauses)
{
gfc_se se;
tree dovar, stmt, from, to, step, type, init, cond, incr;
@@ -897,6 +897,7 @@ gfc_trans_omp_do (gfc_code *code, stmtbl
stmtblock_t body;
int simple = 0;
bool dovar_found = false;
+ gfc_omp_clauses *clauses = code->ext.omp_clauses;
code = code->block->next;
gcc_assert (code->op == EXEC_DO);
@@ -907,7 +908,7 @@ gfc_trans_omp_do (gfc_code *code, stmtbl
pblock = █
}
- omp_clauses = gfc_trans_omp_clauses (pblock, clauses, code->loc);
+ omp_clauses = gfc_trans_omp_clauses (pblock, do_clauses, code->loc);
if (clauses)
{
gfc_namelist *n;
--- libgomp/testsuite/libgomp.fortran/pr28390.f.jj 2006-07-15 15:52:33.000000000 +0200
+++ libgomp/testsuite/libgomp.fortran/pr28390.f 2006-07-15 15:52:12.000000000 +0200
@@ -0,0 +1,8 @@
+! PR fortran/28390
+ program pr28390
+ integer i
+!$omp parallel do lastprivate(i)
+ do i=1,100
+ end do
+ if (i.ne.101) call abort
+ end
gcc41-reassoc1.patch:
0 files changed
--- NEW FILE gcc41-reassoc1.patch ---
2005-12-12 Jeff Law <law at redhat.com>
* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Remove
reassociation code.
* passes.c (init_optimization_passes): Run reassociation again
after loop optimizations.
2005-12-12 Daniel Berlin <dberlin at dberlin.org>
* tree-ssa-dom.c (thread_across_edge): Canonicalize condition
if necessary.
(optimize_stmt): Ditto.
(canonicalize_comparison): New function.
* tree-ssa-operands.c (swap_tree_operands): Make external.
(get_expr_operands): Stop auto-canonicalization.
* tree-ssa-reassoc.c: Rewrite.
(init_optimization_passes):
* tree-flow.h (swap_tree_operands): Prototype.
* Makefile.in (tree-ssa-reassoc.o): Update dependencies.
* gcc.dg/tree-ssa/ssa-pre-2.c: Update due to reassociation changes.
* gcc.dg/tree-ssa/reassoc-1.c: Likewise.
* gcc.dg/tree-ssa/reassoc-2.c: Likewise.
* gcc.dg/tree-ssa/reassoc-3.c: Likewise.
* gcc.dg/tree-ssa/reassoc-4.c: Likewise.
* gcc.dg/tree-ssa/reassoc-5.c: New.
* gcc.dg/tree-ssa/reassoc-6.c: New.
* gcc.dg/tree-ssa/reassoc-7.c: New.
* gcc.dg/tree-ssa/reassoc-8.c: New.
* gcc.dg/tree-ssa/reassoc-9.c: New.
* gcc.dg/tree-ssa/reassoc-10.c: New.
* gcc.dg/tree-ssa/reassoc-11.c: New.
--- gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-2.c (revision 108424)
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-2.c (revision 108425)
@@ -16,6 +16,7 @@ int motion_test1(int data, int data_0, i
return v * t * u;
}
/* We should eliminate one computation of data_0 + data_3 along the
- main path, causing one reload. */
-/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre"} } */
+ main path, and one computation of v * i along the main path, causing
+ two eliminations. */
+/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-3.c (revision 108424)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-3.c (revision 108425)
@@ -1,18 +1,6 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized -ffast-math" } */
-float a, b, c, d;
-extern int printf (const char *, ...);
-int main(void)
+int main(int a, int b, int c, int d)
{
- float e;
- float f;
- /* We should be able to transform these into the same expression, and only have two additions. */
- e = a + b;
- e = e + c;
- f = c + a;
- f = f + b;
- printf ("%f %f\n", e, f);
+ int e = (a & ~b) & (~c & d);
+ int f = (~c & a) & (b & ~d);
+ return (e & f);
}
-
-/* { dg-final { scan-tree-dump-times "\\\+" 2 "optimized"} } */
-/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-4.c (revision 108424)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-4.c (revision 108425)
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fdump-tree-optimized -ffast-math" } */
float a, b, c, d;
extern int printf (const char *, ...);
int main(void)
@@ -14,5 +14,5 @@ int main(void)
printf ("%f %f\n", e, f);
}
-/* { dg-final { scan-tree-dump-times "\\\+" 4 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "\\\+" 2 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-5.c (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-5.c (revision 108425)
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+extern int printf (const char *, ...);
+int main(int argc, int b)
+{
+ /* We should be able to get rid of the a - i. */
+ int i;
+ for (i = 0; i < 50; i++)
+ {
+ int a = b + i;
+ int c = a - i;
+ int d = argc + b;
+ printf ("%d %d\n", c,d);
+ }
+}
+/* { dg-final { scan-tree-dump-times "a - i" 0 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-6.c (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-6.c (revision 108425)
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1" } */
+int main(int a, int b, int c, int d)
+{
+ /* Should be transformed into a + c + 8 */
+ int e = a + 3;
+ int f = c + 5;
+ int g = e + f;
+ return g;
+}
+
+/* { dg-final { scan-tree-dump-times "\\\+ 8" 1 "reassoc1"} } */
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-7.c (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-7.c (revision 108425)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1" } */
+int main(int a, int b, int c, int d, int e, int f, int g, int h)
+{
+ /* Should be transformed into a + c + d + e + g + 15 */
+ int i = (a + 9) + (c + d);
+ int j = (e + 4) + (2 + g);
+ e = i + j;
+ return e;
+}
+/* { dg-final { scan-tree-dump-times "\\\+ 15" 1 "reassoc1"} } */
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-8.c (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-8.c (revision 108425)
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1" } */
+
+int main(int a, int b, int c, int d, int e, int f, int g, int h)
+{
+ /* e & ~e -> 0 */
+ int i = (a & 9) & (c & d);
+ int j = (~e & d) & (~c & e);
+ e = i & j;
+ return e;
+}
+/* { dg-final { scan-tree-dump-times "= 0" 1 "reassoc1"} } */
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-10.c (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-10.c (revision 108425)
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+int main(int a, int b, int c, int d)
+{
+ /* Should become just a & b & c & d */
+ int e = (a & b) & (c & d);
+ int f = (c & a) & (b & d);
+ return e & f;
+}
+/* { dg-final { scan-tree-dump-times "\\\& " 3 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-1.c (revision 108424)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-1.c (revision 108425)
@@ -14,5 +14,5 @@ int main(void)
printf ("%d %d\n", e, f);
}
-/* { dg-final { scan-tree-dump-times "a \\\+ b" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "b \\\+ a" 1 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-9.c (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-9.c (revision 108425)
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1" } */
+
+int main(int a, int b, int c, int d, int e, int f, int g, int h)
+{
+ /* Should be transformed into e = 20 */
+ int i = (a + 9) + (c + 8);
+ int j = (-c + 1) + (-a + 2);
+
+ e = i + j;
+ return e;
+}
+/* { dg-final { scan-tree-dump-times "= 20" 1 "reassoc1"} } */
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-11.c (revision 0)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-11.c (revision 108425)
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1" } */
+int main(int a, int b, int c, int d)
[...2015 lines suppressed...]
+ else
+ {
+ rewrite_expr_tree (stmt, 0, ops);
+ }
+
+ VEC_free (operand_entry_t, heap, ops);
+ }
+ }
+ }
+ for (son = first_dom_son (CDI_POST_DOMINATORS, bb);
+ son;
+ son = next_dom_son (CDI_POST_DOMINATORS, son))
+ reassociate_bb (son);
+}
+
+void dump_ops_vector (FILE *file, VEC (operand_entry_t, heap) *ops);
+void debug_ops_vector (VEC (operand_entry_t, heap) *ops);
+
+/* Dump the operand entry vector OPS to FILE. */
+
+void
+dump_ops_vector (FILE *file, VEC (operand_entry_t, heap) *ops)
+{
+ operand_entry_t oe;
+ unsigned int i;
+
+ for (i = 0; VEC_iterate (operand_entry_t, ops, i, oe); i++)
+ {
+ fprintf (file, "Op %d -> rank: %d, tree: ", i, oe->rank);
+ print_generic_stmt (file, oe->op, 0);
+ }
+}
+
+/* Dump the operand entry vector OPS to STDERR. */
+
+void
+debug_ops_vector (VEC (operand_entry_t, heap) *ops)
+{
+ dump_ops_vector (stderr, ops);
+}
+
+static void
+do_reassoc (void)
+{
+ break_up_subtract_bb (ENTRY_BLOCK_PTR);
+ reassociate_bb (EXIT_BLOCK_PTR);
+}
+
+/* Initialize the reassociation pass. */
+
+static void
+init_reassoc (void)
+{
+ int i;
+ unsigned int rank = 2;
+ tree param;
+ int *bbs = xmalloc ((last_basic_block + 1) * sizeof (int));
+
+ memset (&reassociate_stats, 0, sizeof (reassociate_stats));
+
+ operand_entry_pool = create_alloc_pool ("operand entry pool",
+ sizeof (struct operand_entry), 30);
+
+ /* Reverse RPO (Reverse Post Order) will give us something where
+ deeper loops come later. */
+ flow_depth_first_order_compute (NULL, bbs);
+ bb_rank = xcalloc (last_basic_block + 1, sizeof (unsigned int));
+
+ operand_rank = htab_create (511, operand_entry_hash,
+ operand_entry_eq, 0);
+
+ /* Give each argument a distinct rank. */
+ for (param = DECL_ARGUMENTS (current_function_decl);
+ param;
+ param = TREE_CHAIN (param))
+ {
+ if (default_def (param) != NULL)
+ {
+ tree def = default_def (param);
+ insert_operand_rank (def, ++rank);
+ }
+ }
+
+ /* Give the chain decl a distinct rank. */
+ if (cfun->static_chain_decl != NULL)
+ {
+ tree def = default_def (cfun->static_chain_decl);
+ if (def != NULL)
+ insert_operand_rank (def, ++rank);
+ }
+
+ /* Set up rank for each BB */
+ for (i = 0; i < n_basic_blocks; i++)
+ bb_rank[bbs[i]] = ++rank << 16;
+
+ free (bbs);
+ calculate_dominance_info (CDI_DOMINATORS);
+ calculate_dominance_info (CDI_POST_DOMINATORS);
+ broken_up_subtracts = NULL;
+}
+
+/* Cleanup after the reassociation pass, and print stats if
+ requested. */
+
+static void
+fini_reassoc (void)
+{
+
+ if (dump_file && (dump_flags & TDF_STATS))
+ {
+ fprintf (dump_file, "Reassociation stats:\n");
+ fprintf (dump_file, "Linearized: %d\n",
+ reassociate_stats.linearized);
+ fprintf (dump_file, "Constants eliminated: %d\n",
+ reassociate_stats.constants_eliminated);
+ fprintf (dump_file, "Ops eliminated: %d\n",
+ reassociate_stats.ops_eliminated);
+ fprintf (dump_file, "Statements rewritten: %d\n",
+ reassociate_stats.rewritten);
+ }
+ htab_delete (operand_rank);
+
+ free_alloc_pool (operand_entry_pool);
+ free (bb_rank);
+ VEC_free (tree, heap, broken_up_subtracts);
+ free_dominance_info (CDI_POST_DOMINATORS);
+}
+
+/* Gate and execute functions for Reassociation. */
+
+static void
+execute_reassoc (void)
+{
+ init_reassoc ();
+
+ do_reassoc ();
+ repropagate_negates ();
+
fini_reassoc ();
}
@@ -635,7 +1514,6 @@ struct tree_opt_pass pass_reassoc =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_update_ssa | TODO_dump_func
- | TODO_ggc_collect | TODO_verify_ssa, /* todo_flags_finish */
+ TODO_dump_func | TODO_ggc_collect | TODO_verify_ssa, /* todo_flags_finish */
0 /* letter */
};
--- gcc/tree-ssa-operands.c (revision 108424)
+++ gcc/tree-ssa-operands.c (revision 108425)
@@ -1047,7 +1047,6 @@ swap_tree_operands (tree stmt, tree *exp
*exp1 = op0;
}
-
/* Recursively scan the expression pointed to by EXPR_P in statement referred
to by INFO. FLAGS is one of the OPF_* constants modifying how to interpret
the operands found. */
@@ -1260,39 +1259,6 @@ get_expr_operands (tree stmt, tree *expr
case ASSERT_EXPR:
do_binary:
{
- tree op0 = TREE_OPERAND (expr, 0);
- tree op1 = TREE_OPERAND (expr, 1);
-
- /* If it would be profitable to swap the operands, then do so to
- canonicalize the statement, enabling better optimization.
-
- By placing canonicalization of such expressions here we
- transparently keep statements in canonical form, even
- when the statement is modified. */
- if (tree_swap_operands_p (op0, op1, false))
- {
- /* For relationals we need to swap the operands
- and change the code. */
- if (code == LT_EXPR
- || code == GT_EXPR
- || code == LE_EXPR
- || code == GE_EXPR)
- {
- TREE_SET_CODE (expr, swap_tree_comparison (code));
- swap_tree_operands (stmt,
- &TREE_OPERAND (expr, 0),
- &TREE_OPERAND (expr, 1));
- }
-
- /* For a commutative operator we can just swap the operands. */
- else if (commutative_tree_code (code))
- {
- swap_tree_operands (stmt,
- &TREE_OPERAND (expr, 0),
- &TREE_OPERAND (expr, 1));
- }
- }
-
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
get_expr_operands (stmt, &TREE_OPERAND (expr, 1), flags);
return;
gcc41-reassoc2.patch:
0 files changed
--- NEW FILE gcc41-reassoc2.patch ---
2005-12-19 Roger Sayle <roger at eyesopen.com>
* combine.c (try_combine): Improve splitting of binary operators
by taking advantage of reassociative transformations.
--- gcc/combine.c (revision 108833)
+++ gcc/combine.c (revision 108834)
@@ -2527,6 +2527,8 @@ try_combine (rtx i3, rtx i2, rtx i1, int
rtx newdest = i2dest;
enum rtx_code split_code = GET_CODE (*split);
enum machine_mode split_mode = GET_MODE (*split);
+ bool subst_done = false;
+ newi2pat = NULL_RTX;
/* Get NEWDEST as a register in the proper mode. We have already
validated that we can do this. */
@@ -2572,8 +2574,69 @@ try_combine (rtx i3, rtx i2, rtx i1, int
}
#endif
- newi2pat = gen_rtx_SET (VOIDmode, newdest, *split);
- SUBST (*split, newdest);
+ /* Attempt to split binary operators using arithmetic identities. */
+ if (BINARY_P (SET_SRC (newpat))
+ && split_mode == GET_MODE (SET_SRC (newpat))
+ && ! side_effects_p (SET_SRC (newpat)))
+ {
+ rtx setsrc = SET_SRC (newpat);
+ enum machine_mode mode = GET_MODE (setsrc);
+ enum rtx_code code = GET_CODE (setsrc);
+ rtx src_op0 = XEXP (setsrc, 0);
+ rtx src_op1 = XEXP (setsrc, 1);
+
+ /* Split "X = Y op Y" as "Z = Y; X = Z op Z". */
+ if (rtx_equal_p (src_op0, src_op1))
+ {
+ newi2pat = gen_rtx_SET (VOIDmode, newdest, src_op0);
+ SUBST (XEXP (setsrc, 0), newdest);
+ SUBST (XEXP (setsrc, 1), newdest);
+ subst_done = true;
+ }
+ /* Split "((P op Q) op R) op S" where op is PLUS or MULT. */
+ else if ((code == PLUS || code == MULT)
+ && GET_CODE (src_op0) == code
+ && GET_CODE (XEXP (src_op0, 0)) == code
+ && (INTEGRAL_MODE_P (mode)
+ || (FLOAT_MODE_P (mode)
+ && flag_unsafe_math_optimizations)))
+ {
+ rtx p = XEXP (XEXP (src_op0, 0), 0);
+ rtx q = XEXP (XEXP (src_op0, 0), 1);
+ rtx r = XEXP (src_op0, 1);
+ rtx s = src_op1;
+
+ /* Split both "((X op Y) op X) op Y" and
+ "((X op Y) op Y) op X" as "T op T" where T is
+ "X op Y". */
+ if ((rtx_equal_p (p,r) && rtx_equal_p (q,s))
+ || (rtx_equal_p (p,s) && rtx_equal_p (q,r)))
+ {
+ newi2pat = gen_rtx_SET (VOIDmode, newdest,
+ XEXP (src_op0, 0));
+ SUBST (XEXP (setsrc, 0), newdest);
+ SUBST (XEXP (setsrc, 1), newdest);
+ subst_done = true;
+ }
+ /* Split "((X op X) op Y) op Y)" as "T op T" where
+ T is "X op Y". */
+ else if (rtx_equal_p (p,q) && rtx_equal_p (r,s))
+ {
+ rtx tmp = simplify_gen_binary (code, mode, p, r);
+ newi2pat = gen_rtx_SET (VOIDmode, newdest, tmp);
+ SUBST (XEXP (setsrc, 0), newdest);
+ SUBST (XEXP (setsrc, 1), newdest);
+ subst_done = true;
+ }
+ }
+ }
+
+ if (!subst_done)
+ {
+ newi2pat = gen_rtx_SET (VOIDmode, newdest, *split);
+ SUBST (*split, newdest);
+ }
+
i2_code_number = recog_for_combine (&newi2pat, i2, &new_i2_notes);
/* recog_for_combine might have added CLOBBERs to newi2pat.
gcc41-reassoc3.patch:
0 files changed
--- NEW FILE gcc41-reassoc3.patch ---
2005-01-04 Jeff Law <law at redhat.com>
PR ada/24994
* tree-cfg.c (bsi_replace): Remove the original statement
from the EH throw statement table.
--- gcc/tree-cfg.c (revision 109334)
+++ gcc/tree-cfg.c (revision 109335)
@@ -2869,7 +2869,10 @@ bsi_replace (const block_stmt_iterator *
{
eh_region = lookup_stmt_eh_region (orig_stmt);
if (eh_region >= 0)
- add_stmt_to_eh_region (stmt, eh_region);
+ {
+ remove_stmt_from_eh_region (stmt);
+ add_stmt_to_eh_region (stmt, eh_region);
+ }
}
delink_stmt_imm_use (orig_stmt);
gcc41-reassoc4.patch:
omp-low.c | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
--- NEW FILE gcc41-reassoc4.patch ---
2006-07-12 Peter Bergner <bergner at vnet.ibm.com>
* omp-low.c (expand_omp_parallel): Add new argument to
bsi_remove call.
(expand_omp_for_generic): Likewise.
(expand_omp_for_static_nochunk): Likewise.
(expand_omp_for_static_chunk): Likewise.
(expand_omp_sections): Likewise.
(expand_omp_single): Likewise.
(expand_omp_synch): Likewise.
2005-01-06 Jeff Law <law at redhat.com>
PR ada/24994
* tree-cfg.c (bsi_replace): Rename final argument from
PRESERVE_EH_INFO to UPDATE_EH_INFO. Fix typo in last
change (stmt -> orig_stmt).
* tree-eh.c (verify_eh_throw_stmt_node): New function.
(bsi_remove): Add new argument. Remove EH information
if requested.
(verify_eh_throw_table_statements): New function.
(bsi_remove): Add new argument REMOVE_EH_INFO. All callers
updated.
* tree-optimize.c (execute_free_cfg_annotations): Verify
the EH throw statement table after removing annotations.
* except.h (verify_eh_throw_table_statements): Prototype.
* tree-flow.h (bsi_remove): Update prototype.
* tree-vrp.c (remove_range_assertions): Add new argument to
bsi_remove call.
* tree-ssa-loop-im.c (move_computations_stmt): Likewise.
* tree-complex.c (expand_complex_div_wide): Likewise.
* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Likewise
* tree-tailcall.c (eliminate_tailcall): Likewise.
* tree-ssa-dse.c (dse_optimize_stmt): Likewise.
* tree-ssa-loop-ivopts.c (remove_statement): Likewise.
* tree-nrv.c (tree_nrv): Likewise.
* tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Likewise.
* tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
(combine_blocks): Likewise.
* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Likewise.
* tree-cfgcleanup.c (cleanup_ctrl_expr_graph): Likewise.
(cleanup_control_flow): Likewise.
(remove_forwarder_block): Likewise.
* tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
* tree-sra.c (sra_replace): Likewise.
* tree-ssa-forwprop.c (forward_propagate_into_cond): Likewise.
(forward_propagate_single_use_vars): Likewise.
* tree-ssa-dce.c (remove_dead_stmt): Likewise.
* tree-inline.c (expand_call_inline): Likewise.
* tree-vect-transform.c (vect_transform_loop): Likewise.
* tree-outof-ssa.c (rewrite_trees): Likewise.
* tree-cfg.c (make_goto_expr_edges): Likewise.
(cleanup_dead_labels): Likewise.
(tree_merge_blocks, remove_bb, disband_implicit_edges): Likewise.
(bsi_move_before, bsi_move_after): Likewise.
(bsi_move_to_bb_end, try_redirect_by_replacing_jump): Likewise
(tree_redirect_edge_and_branch, tree_split_block): Likewise.
--- gcc/tree-vrp.c (revision 109420)
+++ gcc/tree-vrp.c (revision 109421)
@@ -3026,7 +3026,7 @@ remove_range_assertions (void)
}
/* And finally, remove the copy, it is not needed. */
- bsi_remove (&si);
+ bsi_remove (&si, true);
}
else
bsi_next (&si);
--- gcc/tree-ssa-loop-im.c (revision 109420)
+++ gcc/tree-ssa-loop-im.c (revision 109421)
@@ -759,7 +759,7 @@ move_computations_stmt (struct dom_walk_
cost, level->num);
}
bsi_insert_on_edge (loop_preheader_edge (level), stmt);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, false);
}
}
--- gcc/tree-complex.c (revision 109420)
+++ gcc/tree-complex.c (revision 109421)
@@ -1124,7 +1124,7 @@ expand_complex_div_wide (block_stmt_iter
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- bsi_remove (bsi);
+ bsi_remove (bsi, true);
}
}
@@ -1163,7 +1163,7 @@ expand_complex_div_wide (block_stmt_iter
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
t1 = build2 (MODIFY_EXPR, inner_type, ri, ti);
bsi_insert_before (bsi, t1, BSI_SAME_STMT);
- bsi_remove (bsi);
+ bsi_remove (bsi, true);
}
}
--- gcc/tree-ssa-threadupdate.c (revision 109420)
+++ gcc/tree-ssa-threadupdate.c (revision 109421)
@@ -180,7 +180,7 @@ remove_ctrl_stmt_and_useless_edges (basi
&& (TREE_CODE (bsi_stmt (bsi)) == COND_EXPR
|| TREE_CODE (bsi_stmt (bsi)) == GOTO_EXPR
|| TREE_CODE (bsi_stmt (bsi)) == SWITCH_EXPR))
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
{
--- gcc/tree-tailcall.c (revision 109420)
+++ gcc/tree-tailcall.c (revision 109421)
@@ -735,7 +735,7 @@ eliminate_tail_call (struct tailcall *t)
if (TREE_CODE (t) == RETURN_EXPR)
break;
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
release_defs (t);
}
@@ -825,7 +825,7 @@ eliminate_tail_call (struct tailcall *t)
SSA_NAME_DEF_STMT (rslt) = build_empty_stmt ();
}
- bsi_remove (&t->call_bsi);
+ bsi_remove (&t->call_bsi, true);
release_defs (call);
}
--- gcc/tree-ssa-dse.c (revision 109420)
+++ gcc/tree-ssa-dse.c (revision 109421)
@@ -351,7 +351,7 @@ dse_optimize_stmt (struct dom_walk_data
SET_USE (use_p, USE_FROM_PTR (var2));
}
/* Remove the dead store. */
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
/* And release any SSA_NAMEs set in this statement back to the
SSA_NAME manager. */
--- gcc/tree-ssa-loop-ivopts.c (revision 109420)
+++ gcc/tree-ssa-loop-ivopts.c (revision 109421)
@@ -5326,7 +5326,7 @@ remove_statement (tree stmt, bool includ
{
block_stmt_iterator bsi = bsi_for_stmt (stmt);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
}
}
--- gcc/tree-nrv.c (revision 109420)
+++ gcc/tree-nrv.c (revision 109421)
@@ -200,7 +200,7 @@ tree_nrv (void)
if (TREE_CODE (*tp) == MODIFY_EXPR
&& TREE_OPERAND (*tp, 0) == result
&& TREE_OPERAND (*tp, 1) == found)
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
else
{
walk_tree (tp, finalize_nrv_r, &data, 0);
--- gcc/tree-eh.c (revision 109420)
+++ gcc/tree-eh.c (revision 109421)
@@ -2075,3 +2075,25 @@ maybe_clean_or_replace_eh_stmt (tree old
return false;
}
+
+#ifdef ENABLE_CHECKING
+static int
+verify_eh_throw_stmt_node (void **slot, void *data ATTRIBUTE_UNUSED)
+{
+ struct throw_stmt_node *node = (struct throw_stmt_node *)*slot;
+
+ gcc_assert (node->stmt->common.ann == NULL);
+ return 1;
+}
+
+void
+verify_eh_throw_table_statements (void)
+{
+ if (!get_eh_throw_stmt_table (cfun))
+ return;
+ htab_traverse (get_eh_throw_stmt_table (cfun),
+ verify_eh_throw_stmt_node,
+ NULL);
+}
+
+#endif
--- gcc/tree-vectorizer.c (revision 109420)
+++ gcc/tree-vectorizer.c (revision 109421)
@@ -805,7 +805,7 @@ slpeel_make_loop_iterate_ntimes (struct
bsi_insert_before (&loop_cond_bsi, cond_stmt, BSI_SAME_STMT);
/* Remove old loop exit test: */
- bsi_remove (&loop_cond_bsi);
+ bsi_remove (&loop_cond_bsi, true);
loop_loc = find_loop_location (loop);
if (dump_file && (dump_flags & TDF_DETAILS))
--- gcc/tree-if-conv.c (revision 109420)
+++ gcc/tree-if-conv.c (revision 109421)
@@ -287,7 +287,7 @@ tree_if_convert_cond_expr (struct loop *
using new condition. */
if (!bb_with_exit_edge_p (loop, bb_for_stmt (stmt)))
{
- bsi_remove (bsi);
+ bsi_remove (bsi, true);
cond = NULL_TREE;
}
return;
@@ -934,7 +934,7 @@ combine_blocks (struct loop *loop)
for (bsi = bsi_start (bb); !bsi_end_p (bsi); )
{
if (TREE_CODE (bsi_stmt (bsi)) == LABEL_EXPR)
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
else
{
set_bb_for_stmt (bsi_stmt (bsi), merge_target_bb);
--- gcc/tree-ssa-phiopt.c (revision 109420)
+++ gcc/tree-ssa-phiopt.c (revision 109421)
@@ -351,7 +351,7 @@ replace_phi_edge_with_variable (basic_bl
/* Eliminate the COND_EXPR at the end of COND_BLOCK. */
bsi = bsi_last (cond_block);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
--- gcc/except.h (revision 109420)
+++ gcc/except.h (revision 109421)
@@ -173,3 +173,7 @@ struct throw_stmt_node GTY(())
extern struct htab *get_eh_throw_stmt_table (struct function *);
extern void set_eh_throw_stmt_table (struct function *, struct htab *);
+
+#ifdef ENABLE_CHECKING
+extern void verify_eh_throw_table_statements (void);
+#endif
--- gcc/tree-cfgcleanup.c (revision 109420)
+++ gcc/tree-cfgcleanup.c (revision 109421)
@@ -117,7 +117,7 @@ cleanup_control_expr_graph (basic_block
else
taken_edge = single_succ_edge (bb);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
taken_edge->flags = EDGE_FALLTHRU;
/* We removed some paths from the cfg. */
@@ -207,7 +207,7 @@ cleanup_control_flow (void)
/* Remove the GOTO_EXPR as it is not needed. The CFG has all the
relevant information we need. */
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
retval = true;
}
@@ -433,7 +433,7 @@ remove_forwarder_block (basic_block bb,
{
label = bsi_stmt (bsi);
gcc_assert (TREE_CODE (label) == LABEL_EXPR);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, false);
bsi_insert_before (&bsi_to, label, BSI_CONTINUE_LINKING);
}
}
--- gcc/tree-ssa-pre.c (revision 109420)
+++ gcc/tree-ssa-pre.c (revision 109421)
@@ -2549,7 +2549,7 @@ remove_dead_inserted_code (void)
else
{
bsi = bsi_for_stmt (t);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
}
}
}
@@ -2899,7 +2899,7 @@ do_eustores (void)
print_generic_stmt (dump_file, stmt, 0);
}
mark_sym_for_renaming (TREE_OPERAND (stmt, 0));
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
}
else
{
--- gcc/tree-sra.c (revision 109420)
+++ gcc/tree-sra.c (revision 109421)
@@ -1825,7 +1825,7 @@ static void
sra_replace (block_stmt_iterator *bsi, tree list)
{
sra_insert_before (bsi, list);
- bsi_remove (bsi);
+ bsi_remove (bsi, false);
if (bsi_end_p (*bsi))
*bsi = bsi_last (bsi->bb);
else
--- gcc/tree-ssa-forwprop.c (revision 109420)
+++ gcc/tree-ssa-forwprop.c (revision 109421)
@@ -433,7 +433,7 @@ forward_propagate_into_cond (tree cond_e
{
tree def = SSA_NAME_DEF_STMT (test_var);
block_stmt_iterator bsi = bsi_for_stmt (def);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
}
}
}
@@ -705,7 +705,7 @@ tree_ssa_forward_propagate_single_use_va
&& TREE_CODE (TREE_OPERAND (stmt, 0)) == SSA_NAME)
{
if (forward_propagate_addr_expr (stmt))
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
else
bsi_next (&bsi);
}
--- gcc/tree-ssa-dce.c (revision 109420)
+++ gcc/tree-ssa-dce.c (revision 109421)
@@ -799,7 +799,7 @@ remove_dead_stmt (block_stmt_iterator *i
tree def = DEF_FROM_PTR (def_p);
mark_sym_for_renaming (SSA_NAME_VAR (def));
}
- bsi_remove (i);
+ bsi_remove (i, true);
release_defs (t);
}
--- gcc/tree-inline.c (revision 109420)
+++ gcc/tree-inline.c (revision 109421)
@@ -2067,7 +2067,7 @@ expand_call_inline (basic_block bb, tree
else
{
tree stmt = bsi_stmt (stmt_bsi);
- bsi_remove (&stmt_bsi);
+ bsi_remove (&stmt_bsi, false);
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
}
stmt_bsi = bsi_start (return_block);
@@ -2182,7 +2182,7 @@ expand_call_inline (basic_block bb, tree
else
/* We're modifying a TSI owned by gimple_expand_calls_inline();
tsi_delink() will leave the iterator in a sane state. */
- bsi_remove (&stmt_bsi);
+ bsi_remove (&stmt_bsi, true);
bsi_next (&bsi);
if (bsi_end_p (bsi))
--- gcc/tree-optimize.c (revision 109420)
+++ gcc/tree-optimize.c (revision 109421)
@@ -209,6 +209,12 @@ execute_free_cfg_annotations (void)
/* And get rid of annotations we no longer need. */
delete_tree_cfg_annotations ();
+
+#ifdef ENABLE_CHECKING
+ /* Once the statement annotations have been removed, we can verify
+ the integrity of statements in the EH throw table. */
+ verify_eh_throw_table_statements ();
+#endif
}
struct tree_opt_pass pass_free_cfg_annotations =
--- gcc/tree-vect-transform.c (revision 109420)
+++ gcc/tree-vect-transform.c (revision 109421)
@@ -2944,7 +2944,7 @@ vect_transform_loop (loop_vec_info loop_
stmt_ann_t ann = stmt_ann (stmt);
free (stmt_info);
set_stmt_info ((tree_ann_t)ann, NULL);
- bsi_remove (&si);
+ bsi_remove (&si, true);
continue;
}
--- gcc/tree-outof-ssa.c (revision 109420)
+++ gcc/tree-outof-ssa.c (revision 109421)
@@ -1940,7 +1940,7 @@ rewrite_trees (var_map map, tree *values
/* Remove any stmts marked for removal. */
if (remove)
- bsi_remove (&si);
+ bsi_remove (&si, true);
else
bsi_next (&si);
}
--- gcc/tree-flow.h (revision 109420)
+++ gcc/tree-flow.h (revision 109421)
@@ -449,7 +449,7 @@ static inline void bsi_prev (block_stmt_
static inline tree bsi_stmt (block_stmt_iterator);
static inline tree * bsi_stmt_ptr (block_stmt_iterator);
-extern void bsi_remove (block_stmt_iterator *);
+extern void bsi_remove (block_stmt_iterator *, bool);
extern void bsi_move_before (block_stmt_iterator *, block_stmt_iterator *);
extern void bsi_move_after (block_stmt_iterator *, block_stmt_iterator *);
extern void bsi_move_to_bb_end (block_stmt_iterator *, basic_block);
--- gcc/tree-cfg.c (revision 109420)
+++ gcc/tree-cfg.c (revision 109421)
@@ -843,7 +843,7 @@ make_goto_expr_edges (basic_block bb)
#else
e->goto_locus = EXPR_LOCUS (goto_t);
#endif
- bsi_remove (&last);
+ bsi_remove (&last, true);
return;
}
@@ -1064,7 +1064,7 @@ cleanup_dead_labels (void)
|| DECL_NONLOCAL (label))
bsi_next (&i);
else
- bsi_remove (&i);
+ bsi_remove (&i, true);
}
}
@@ -1362,7 +1362,7 @@ tree_merge_blocks (basic_block a, basic_
{
tree label = bsi_stmt (bsi);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, false);
/* Now that we can thread computed gotos, we might have
a situation where we have a forced label in block B
However, the label at the start of block B might still be
@@ -2024,7 +2024,7 @@ remove_bb (basic_block bb)
new_bb = bb->prev_bb;
new_bsi = bsi_start (new_bb);
- bsi_remove (&i);
+ bsi_remove (&i, false);
bsi_insert_before (&new_bsi, stmt, BSI_NEW_STMT);
}
else
@@ -2036,7 +2036,7 @@ remove_bb (basic_block bb)
if (in_ssa_p)
release_defs (stmt);
- bsi_remove (&i);
+ bsi_remove (&i, true);
}
/* Don't warn for removed gotos. Gotos are often removed due to
@@ -2584,7 +2584,7 @@ disband_implicit_edges (void)
if (bb->next_bb == EXIT_BLOCK_PTR
&& !TREE_OPERAND (stmt, 0))
{
- bsi_remove (&last);
+ bsi_remove (&last, true);
single_succ_edge (bb)->flags |= EDGE_FALLTHRU;
}
continue;
@@ -2800,16 +2800,25 @@ bsi_insert_after (block_stmt_iterator *i
/* Remove the statement pointed to by iterator I. The iterator is updated
- to the next statement. */
+ to the next statement.
+
+ When REMOVE_EH_INFO is true we remove the statement pointed to by
+ iterator I from the EH tables. Otherwise we do not modify the EH
+ tables.
+
+ Generally, REMOVE_EH_INFO should be true when the statement is going to
+ be removed from the IL and not reinserted elsewhere. */
void
-bsi_remove (block_stmt_iterator *i)
+bsi_remove (block_stmt_iterator *i, bool remove_eh_info)
{
tree t = bsi_stmt (*i);
set_bb_for_stmt (t, NULL);
delink_stmt_imm_use (t);
tsi_delink (&i->tsi);
mark_stmt_modified (t);
+ if (remove_eh_info)
+ remove_stmt_from_eh_region (t);
}
@@ -2819,7 +2828,7 @@ void
bsi_move_after (block_stmt_iterator *from, block_stmt_iterator *to)
{
tree stmt = bsi_stmt (*from);
- bsi_remove (from);
+ bsi_remove (from, false);
bsi_insert_after (to, stmt, BSI_SAME_STMT);
}
@@ -2830,7 +2839,7 @@ void
bsi_move_before (block_stmt_iterator *from, block_stmt_iterator *to)
{
tree stmt = bsi_stmt (*from);
- bsi_remove (from);
+ bsi_remove (from, false);
bsi_insert_before (to, stmt, BSI_SAME_STMT);
}
@@ -2851,11 +2860,12 @@ bsi_move_to_bb_end (block_stmt_iterator
/* Replace the contents of the statement pointed to by iterator BSI
- with STMT. If PRESERVE_EH_INFO is true, the exception handling
- information of the original statement is preserved. */
+ with STMT. If UPDATE_EH_INFO is true, the exception handling
+ information of the original statement is moved to the new statement. */
+
void
-bsi_replace (const block_stmt_iterator *bsi, tree stmt, bool preserve_eh_info)
+bsi_replace (const block_stmt_iterator *bsi, tree stmt, bool update_eh_info)
{
int eh_region;
tree orig_stmt = bsi_stmt (*bsi);
@@ -2865,12 +2875,12 @@ bsi_replace (const block_stmt_iterator *
/* Preserve EH region information from the original statement, if
requested by the caller. */
- if (preserve_eh_info)
+ if (update_eh_info)
{
eh_region = lookup_stmt_eh_region (orig_stmt);
if (eh_region >= 0)
{
- remove_stmt_from_eh_region (stmt);
+ remove_stmt_from_eh_region (orig_stmt);
add_stmt_to_eh_region (stmt, eh_region);
}
}
@@ -3969,7 +3979,7 @@ tree_try_redirect_by_replacing_jump (edg
if (TREE_CODE (stmt) == COND_EXPR
|| TREE_CODE (stmt) == SWITCH_EXPR)
{
- bsi_remove (&b);
+ bsi_remove (&b, true);
e = ssa_redirect_edge (e, target);
e->flags = EDGE_FALLTHRU;
return e;
@@ -4066,7 +4076,7 @@ tree_redirect_edge_and_branch (edge e, b
}
case RETURN_EXPR:
- bsi_remove (&bsi);
+ bsi_remove (&bsi, true);
e->flags |= EDGE_FALLTHRU;
break;
@@ -4142,7 +4152,7 @@ tree_split_block (basic_block bb, void *
while (!bsi_end_p (bsi))
{
act = bsi_stmt (bsi);
- bsi_remove (&bsi);
+ bsi_remove (&bsi, false);
bsi_insert_after (&bsi_tgt, act, BSI_NEW_STMT);
}
--- gcc/omp-low.c 2006-07-15 21:46:28.000000000 +0200
+++ gcc/omp-low.c 2006-07-15 22:29:22.000000000 +0200
@@ -2447,7 +2447,7 @@ expand_omp_parallel (struct omp_region *
si = bsi_last (entry_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_PARALLEL);
- bsi_remove (&si);
+ bsi_remove (&si, true);
new_bb = entry_bb;
remove_edge (entry_succ_e);
@@ -2485,7 +2485,7 @@ expand_omp_parallel (struct omp_region *
== OMP_PARALLEL_DATA_ARG (entry_stmt))
{
if (TREE_OPERAND (stmt, 0) == DECL_ARGUMENTS (child_fn))
- bsi_remove (&si);
+ bsi_remove (&si, true);
else
TREE_OPERAND (stmt, 1) = DECL_ARGUMENTS (child_fn);
break;
@@ -2510,7 +2510,7 @@ expand_omp_parallel (struct omp_region *
si = bsi_last (entry_bb);
t = bsi_stmt (si);
gcc_assert (t && TREE_CODE (t) == OMP_PARALLEL);
- bsi_remove (&si);
+ bsi_remove (&si, true);
e = split_block (entry_bb, t);
entry_bb = e->dest;
single_succ_edge (entry_bb)->flags = EDGE_FALLTHRU;
@@ -2532,7 +2532,7 @@ expand_omp_parallel (struct omp_region *
&& TREE_CODE (bsi_stmt (si)) == OMP_RETURN);
t = build1 (RETURN_EXPR, void_type_node, NULL);
bsi_insert_after (&si, t, TSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
}
}
@@ -2627,7 +2627,7 @@ expand_omp_for_generic (struct omp_regio
append_to_statement_list (t, &list);
bsi_insert_after (&si, list, BSI_SAME_STMT);
}
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Iteration setup for sequential loop goes in L0_BB. */
list = alloc_stmt_list ();
@@ -2661,7 +2661,7 @@ expand_omp_for_generic (struct omp_regio
si = bsi_last (cont_bb);
bsi_insert_after (&si, list, BSI_SAME_STMT);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_CONTINUE);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Emit code to get the next parallel iteration in L2_BB. */
list = alloc_stmt_list ();
@@ -2687,7 +2687,7 @@ expand_omp_for_generic (struct omp_regio
t = built_in_decls[BUILT_IN_GOMP_LOOP_END];
t = build_function_call_expr (t, NULL);
bsi_insert_after (&si, t, BSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Connect the new blocks. */
remove_edge (single_succ_edge (entry_bb));
@@ -2821,7 +2821,7 @@ expand_omp_for_static_nochunk (struct om
si = bsi_last (entry_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_FOR);
bsi_insert_after (&si, list, BSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Setup code for sequential iteration goes in SEQ_START_BB. */
list = alloc_stmt_list ();
@@ -2856,7 +2856,7 @@ expand_omp_for_static_nochunk (struct om
si = bsi_last (cont_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_CONTINUE);
bsi_insert_after (&si, list, BSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Replace the OMP_RETURN with a barrier, or nothing. */
si = bsi_last (exit_bb);
@@ -2866,7 +2866,7 @@ expand_omp_for_static_nochunk (struct om
build_omp_barrier (&list);
bsi_insert_after (&si, list, BSI_SAME_STMT);
}
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Connect all the blocks. */
make_edge (seq_start_bb, body_bb, EDGE_FALLTHRU);
@@ -2986,7 +2986,7 @@ expand_omp_for_static_chunk (struct omp_
si = bsi_last (entry_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_FOR);
bsi_insert_after (&si, list, BSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Iteration space partitioning goes in ITER_PART_BB. */
list = alloc_stmt_list ();
@@ -3042,7 +3042,7 @@ expand_omp_for_static_chunk (struct omp_
si = bsi_last (cont_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_CONTINUE);
bsi_insert_after (&si, list, BSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Trip update code goes into TRIP_UPDATE_BB. */
list = alloc_stmt_list ();
@@ -3063,7 +3063,7 @@ expand_omp_for_static_chunk (struct omp_
build_omp_barrier (&list);
bsi_insert_after (&si, list, BSI_SAME_STMT);
}
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Connect the new blocks. */
remove_edge (single_succ_edge (entry_bb));
@@ -3185,7 +3185,7 @@ expand_omp_sections (struct omp_region *
t = build2 (MODIFY_EXPR, void_type_node, v, t);
bsi_insert_after (&si, t, BSI_SAME_STMT);
}
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* The switch() statement replacing OMP_SECTIONS goes in L0_BB. */
si = bsi_start (l0_bb);
@@ -3214,11 +3214,11 @@ expand_omp_sections (struct omp_region *
si = bsi_last (s_entry_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_SECTION);
gcc_assert (i < len || OMP_SECTION_LAST (bsi_stmt (si)));
- bsi_remove (&si);
+ bsi_remove (&si, true);
si = bsi_last (s_exit_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_RETURN);
- bsi_remove (&si);
+ bsi_remove (&si, true);
e = single_pred_edge (s_entry_bb);
e->flags = 0;
@@ -3247,7 +3247,7 @@ expand_omp_sections (struct omp_region *
t = build_function_call_expr (t, NULL);
t = build2 (MODIFY_EXPR, void_type_node, v, t);
bsi_insert_after (&si, t, BSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Cleanup function replaces OMP_RETURN in EXIT_BB. */
si = bsi_last (exit_bb);
@@ -3257,7 +3257,7 @@ expand_omp_sections (struct omp_region *
t = built_in_decls[BUILT_IN_GOMP_SECTIONS_END];
t = build_function_call_expr (t, NULL);
bsi_insert_after (&si, t, BSI_SAME_STMT);
- bsi_remove (&si);
+ bsi_remove (&si, true);
/* Connect the new blocks. */
if (is_combined_parallel (region))
@@ -3297,7 +3297,7 @@ expand_omp_single (struct omp_region *re
OMP_CLAUSE_COPYPRIVATE))
need_barrier = true;
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_SINGLE);
- bsi_remove (&si);
+ bsi_remove (&si, true);
single_succ_edge (entry_bb)->flags = EDGE_FALLTHRU;
si = bsi_last (exit_bb);
@@ -3307,7 +3307,7 @@ expand_omp_single (struct omp_region *re
build_omp_barrier (&t);
bsi_insert_after (&si, t, BSI_SAME_STMT);
}
- bsi_remove (&si);
+ bsi_remove (&si, true);
single_succ_edge (exit_bb)->flags = EDGE_FALLTHRU;
}
@@ -3330,12 +3330,12 @@ expand_omp_synch (struct omp_region *reg
|| TREE_CODE (bsi_stmt (si)) == OMP_MASTER
|| TREE_CODE (bsi_stmt (si)) == OMP_ORDERED
|| TREE_CODE (bsi_stmt (si)) == OMP_CRITICAL);
- bsi_remove (&si);
+ bsi_remove (&si, true);
single_succ_edge (entry_bb)->flags = EDGE_FALLTHRU;
si = bsi_last (exit_bb);
gcc_assert (TREE_CODE (bsi_stmt (si)) == OMP_RETURN);
- bsi_remove (&si);
+ bsi_remove (&si, true);
single_succ_edge (exit_bb)->flags = EDGE_FALLTHRU;
}
gcc41-reassoc5.patch:
0 files changed
--- NEW FILE gcc41-reassoc5.patch ---
2006-04-20 Jeff Law <law at redhat.com>
PR tree-optimization/26854
* tree-ssa-reassoc.c (negate_value): Avoid num_imm_uses when
checking for zero or one use.
(reassociate_bb): Similarly.
--- gcc/tree-ssa-reassoc.c (revision 113119)
+++ gcc/tree-ssa-reassoc.c (revision 113120)
@@ -1032,7 +1032,7 @@ negate_value (tree tonegate, block_stmt_
if (TREE_CODE (tonegate) == SSA_NAME
&& TREE_CODE (negatedef) == MODIFY_EXPR
&& TREE_CODE (TREE_OPERAND (negatedef, 0)) == SSA_NAME
- && num_imm_uses (TREE_OPERAND (negatedef, 0)) == 1
+ && has_single_use (TREE_OPERAND (negatedef, 0))
&& TREE_CODE (TREE_OPERAND (negatedef, 1)) == PLUS_EXPR)
{
block_stmt_iterator bsi;
@@ -1331,7 +1331,7 @@ reassociate_bb (basic_block bb)
/* There may be no immediate uses left by the time we
get here because we may have eliminated them all. */
- if (TREE_CODE (lhs) == SSA_NAME && num_imm_uses (lhs) == 0)
+ if (TREE_CODE (lhs) == SSA_NAME && has_zero_uses (lhs))
continue;
TREE_VISITED (stmt) = 1;
Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- gcc41.spec 11 Jul 2006 16:00:29 -0000 1.79
+++ gcc41.spec 15 Jul 2006 21:13:19 -0000 1.80
@@ -1,6 +1,6 @@
%define DATE 20060711
%define gcc_version 4.1.1
-%define gcc_release 7
+%define gcc_release 8
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64
@@ -36,8 +36,9 @@
# Need binutils which handle -msecure-plt on ppc >= 2.16.91.0.2-2
# Need binutils which support .weakref >= 2.16.91.0.3-1
# Need binutils which support --hash-style=gnu >= 2.17.50.0.2-7
-BuildRequires: binutils >= 2.17.50.0.2-7
-BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo
+# Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8
+BuildRequires: binutils >= 2.17.50.0.2-8
+BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
# Make sure pthread.h doesn't contain __thread tokens
# Make sure glibc supports stack protector
# Make sure glibc supports DT_GNU_HASH
@@ -67,7 +68,8 @@
# Need binutils that owns /usr/bin/c++filt
# Need binutils that support .weakref
# Need binutils that supports --hash-style=gnu
-Requires: binutils >= 2.17.50.0.2-7
+# Need binutils that support mffgpr/mftgpr
+Requires: binutils >= 2.17.50.0.2-8
# Make sure gdb will understand DW_FORM_strp
Conflicts: gdb < 5.1-2
Requires: glibc-devel >= 2.2.90-12
@@ -130,6 +132,14 @@
Patch26: gcc41-visibility.patch
Patch27: gcc41-pr28150.patch
Patch28: gcc41-pr28170.patch
+Patch29: gcc41-pr28370.patch
+Patch30: gcc41-pr28390.patch
+Patch31: gcc41-reassoc1.patch
+Patch32: gcc41-reassoc2.patch
+Patch33: gcc41-reassoc3.patch
+Patch34: gcc41-reassoc4.patch
+Patch35: gcc41-reassoc5.patch
+Patch36: gcc41-power6.patch
%define _gnu %{nil}
%ifarch sparc
%define gcc_target_platform sparc64-%{_vendor}-%{_target_os}
@@ -436,6 +446,14 @@
%patch26 -p0 -b .visibility~
%patch27 -p0 -b .pr28150~
%patch28 -p0 -b .pr28170~
+%patch29 -p0 -b .pr28370~
+%patch30 -p0 -b .pr28390~
+%patch31 -p0 -b .reassoc1~
+%patch32 -p0 -b .reassoc2~
+%patch33 -p0 -b .reassoc3~
+%patch34 -p0 -b .reassoc4~
+%patch35 -p0 -b .reassoc5~
+%patch36 -p0 -b .power6~
sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1477,6 +1495,15 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Sat Jul 15 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-8
+- fix handling of C++ template static data members in anonymous namespace
+ (PR c++/28370)
+- fix Fortran OpenMP handling of !$omp parallel do with lastprivate on the
+ iteration variable (PR fortran/28390)
+- backported reassociation pass rewrite (Daniel Berlin, Jeff Law,
+ Roger Sayle, Peter Bergner, PRs ada/24994, tree-optimization/26854)
+- BuildReq sharutils for uuencode
+
* Tue Jul 11 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-7
- update from gcc-4_1-branch (-r115058:115330)
- PRs c++/13983, c++/17519, c++/18681, c++/18698, c++/26577, c++/27019,
- Previous message (by thread): rpms/libuser/FC-4 libuser-0.53.7-double-free.patch, NONE, 1.1 libuser-0.53.7-enumerate.patch, NONE, 1.1 libuser-0.53.7-lpasswd.patch, NONE, 1.1 libuser.spec, 1.38, 1.39
- Next message (by thread): rpms/kernel/FC-5 linux-2.6-defaults-disable-split-ptlock.patch, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list