lambda-code.c (can_convert_to_perfect_nest): Allow any type of
2006-02-27 Daniel Berlin <dberlin@dberlin.org> * lambda-code.c (can_convert_to_perfect_nest): Allow any type of From-SVN: r111489
This commit is contained in:
parent
754e45a867
commit
e3e868f62e
2 changed files with 13 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-02-27 Daniel Berlin <dberlin@dberlin.org>
|
||||
|
||||
* lambda-code.c (can_convert_to_perfect_nest): Allow any type of
|
||||
scalar operation to be put back into the loop.
|
||||
|
||||
2006-02-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR other/26208
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue