[PATCH] D31821: Remove redundant copy in recurrences
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 15:50:21 PDT 2017
wmi added a comment.
For the example below, findTargetRecurrence starts from r2 and r3 to search a def reg equals to r1. There are a lot of possibilities to explore. That is where the complexity of findTargetRecurrence comes from.
r1 = phi(r2, r3)
r4 = r5 + r1;
r6 = r7 + r4;
r3 = r6 + r8;
After adding the constraint to the recurrence cycle, since all the instructions other than the last one in the recurrence loop should have only one use, it will be easy to start from r1 and search forward. I guess findTargetRecurrence can be simplified a lot if the backward searching is replaced by forward searching, right?
https://reviews.llvm.org/D31821
More information about the llvm-commits
mailing list