summaryrefslogtreecommitdiffstats
path: root/gcc/lambda-code.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-27 17:38:14 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-27 17:38:14 +0000
commit3a6e1ee43d33987c4552cfc46192e464a1293fbc (patch)
tree234caed911ea9e869997ebb34ddb4feca7f4b2fa /gcc/lambda-code.c
parent15c73eb7f6ae9d0be39182f797df10d573be4199 (diff)
downloadppe42-gcc-3a6e1ee43d33987c4552cfc46192e464a1293fbc.tar.gz
ppe42-gcc-3a6e1ee43d33987c4552cfc46192e464a1293fbc.zip
2006-02-27 Daniel Berlin <dberlin@dberlin.org>
* lambda-code.c (can_convert_to_perfect_nest): Allow any type of git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111489 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lambda-code.c')
-rw-r--r--gcc/lambda-code.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c
index 9d61c774231..a47f5801bae 100644
--- a/gcc/lambda-code.c
+++ b/gcc/lambda-code.c
@@ -2257,18 +2257,15 @@ can_convert_to_perfect_nest (struct loop *loop,
if (stmt_uses_op (stmt, iv))
goto fail;
- /* If this is a simple operation like a cast that is
- invariant in the inner loop, or after the inner loop,
- then see if we can place it back where it came from.
- This means that we will propagate casts and other
- cheap invariant operations *back* into or after
- the inner loop if we can interchange the loop, on the
- theory that we are going to gain a lot more by
- interchanging the loop than we are by leaving some
- invariant code there for some other pass to clean
- up. */
+ /* If this is a scalar operation that can be put back
+ into the inner loop, or after the inner loop, through
+ copying, then do so. This works on the theory that
+ any amount of scalar code we have to reduplicate
+ into or after the loops is less expensive that the
+ win we get from rearranging the memory walk
+ the loop is doing so that it has better
+ cache behavior. */
if (TREE_CODE (stmt) == MODIFY_EXPR
- && is_gimple_cast (TREE_OPERAND (stmt, 1))
&& (can_put_in_inner_loop (loop->inner, stmt)
|| can_put_after_inner_loop (loop, stmt)))
continue;
OpenPOWER on IntegriCloud