diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2006-02-16 16:47:20 +0100 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2006-02-16 15:47:20 +0000 |
commit | 28749cfbf33ee0561cb8711ba786d5de6f6fd69f (patch) | |
tree | 3280aa0470bb6a6fec83e0edd515a0c12b6a1129 /gcc | |
parent | b81ac2881e267c356ae502af92da39d9837939de (diff) | |
download | gcc-28749cfbf33ee0561cb8711ba786d5de6f6fd69f.zip gcc-28749cfbf33ee0561cb8711ba786d5de6f6fd69f.tar.gz gcc-28749cfbf33ee0561cb8711ba786d5de6f6fd69f.tar.bz2 |
re PR rtl-optimization/26296 (ACATS ICE cxg2007 cxg2012 verify_flow_info failed)
PR rtl-optimization/26296
* Makefile.in (loop-invariant.c): Add except.h dependency.
* loop-invariant.c: Include except.h.
(find_invariant_insn): Ignore insns satisfying can_throw_internal.
From-SVN: r111139
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/Makefile.in | 2 | ||||
-rw-r--r-- | gcc/loop-invariant.c | 17 |
3 files changed, 16 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cda729a..d01a049 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-02-16 Zdenek Dvorak <dvorakz@suse.cz> + + PR rtl-optimization/26296 + * Makefile.in (loop-invariant.c): Add except.h dependency. + * loop-invariant.c: Include except.h. + (find_invariant_insn): Ignore insns satisfying can_throw_internal. + 2005-02-16 Paul Brook <paul@codesourcery.com> * reload1.c (emit_reload_insns): Invalidate dead input registers used diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f673502..a6158b7 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2423,7 +2423,7 @@ loop-iv.o : loop-iv.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \ loop-invariant.o : loop-invariant.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(EXPR_H) coretypes.h \ $(TM_H) $(TM_P_H) $(FUNCTION_H) $(FLAGS_H) $(DF_H) $(OBSTACK_H) output.h \ - $(HASHTAB_H) + $(HASHTAB_H) except.h cfgloopmanip.o : cfgloopmanip.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \ $(BASIC_BLOCK_H) hard-reg-set.h $(CFGLOOP_H) $(CFGLAYOUT_H) output.h \ coretypes.h $(TM_H) cfghooks.h $(OBSTACK_H) diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index a57857d..03a0c34 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -52,6 +52,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include "flags.h" #include "df.h" #include "hashtab.h" +#include "except.h" /* The data stored for the loop. */ @@ -761,16 +762,14 @@ find_invariant_insn (rtx insn, bool always_reached, bool always_executed) || !check_maybe_invariant (SET_SRC (set))) return; - if (may_trap_p (PATTERN (insn))) - { - if (!always_reached) - return; + /* If the insn can throw exception, we cannot move it at all without changing + cfg. */ + if (can_throw_internal (insn)) + return; - /* Unless the exceptions are handled, the behavior is undefined - if the trap occurs. */ - if (flag_non_call_exceptions) - return; - } + /* We cannot make trapping insn executed, unless it was executed before. */ + if (may_trap_p (PATTERN (insn)) && !always_reached) + return; depends_on = BITMAP_ALLOC (NULL); if (!check_dependencies (insn, depends_on)) |