diff options
author | James Molloy <james.molloy@arm.com> | 2015-08-27 09:53:00 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2015-08-27 09:53:00 +0000 |
commit | 1bbf15c57cd6d7481e5b892f6572da17750e7df2 (patch) | |
tree | 6a84c5feb229381281abef5e11fbf548442d9a2d /llvm/lib/Transforms/Scalar/LoopInterchange.cpp | |
parent | 2d1ed0bfa7b6ae8ef36514e4f8325802984ef3b0 (diff) | |
download | llvm-1bbf15c57cd6d7481e5b892f6572da17750e7df2.zip llvm-1bbf15c57cd6d7481e5b892f6572da17750e7df2.tar.gz llvm-1bbf15c57cd6d7481e5b892f6572da17750e7df2.tar.bz2 |
[LoopVectorize] Extract InductionInfo into a helper class...
... and move it into LoopUtils where it can be used by other passes, just like ReductionDescriptor. The API is very similar to ReductionDescriptor - that is, not very nice at all. Sorting these both out will come in a followup.
NFC
llvm-svn: 246145
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopInterchange.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopInterchange.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp index b99210a..bbd586c 100644 --- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp +++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp @@ -698,9 +698,9 @@ bool LoopInterchangeLegality::findInductionAndReductions( return false; for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) { RecurrenceDescriptor RD; + InductionDescriptor ID; PHINode *PHI = cast<PHINode>(I); - ConstantInt *StepValue = nullptr; - if (isInductionPHI(PHI, SE, StepValue)) + if (InductionDescriptor::isInductionPHI(PHI, SE, ID)) Inductions.push_back(PHI); else if (RecurrenceDescriptor::isReductionPHI(PHI, L, RD)) Reductions.push_back(PHI); |