diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-23 07:00:35 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-23 07:00:35 +0000 |
commit | 813491d0029a21981f65785cacf0f4229315df5f (patch) | |
tree | 038dd7e767cab757a10ca9400a1952ae841999ce /gcc/loop-invariant.c | |
parent | f4618e1c2c649db169baee64b4791fe40205ca7c (diff) | |
download | gcc-813491d0029a21981f65785cacf0f4229315df5f.tar.gz |
2009-02-23 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r144379
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@144380 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r-- | gcc/loop-invariant.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c index 8b8345fe5fd..82e18297e20 100644 --- a/gcc/loop-invariant.c +++ b/gcc/loop-invariant.c @@ -1,5 +1,6 @@ /* RTL-level loop invariant motion. - Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of GCC. @@ -52,6 +53,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "hashtab.h" #include "except.h" +#include "params.h" /* The data stored for the loop. */ @@ -1345,7 +1347,10 @@ move_loop_invariants (void) /* Process the loops, innermost first. */ FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) { - move_single_loop_invariants (loop); + /* move_single_loop_invariants for very large loops + is time consuming and might need a lot of memory. */ + if (loop->num_nodes <= (unsigned) LOOP_INVARIANT_MAX_BBS_IN_LOOP) + move_single_loop_invariants (loop); } FOR_EACH_LOOP (li, loop, 0) |