diff options
author | Andrew Trick <atrick@apple.com> | 2014-09-07 23:16:24 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2014-09-07 23:16:24 +0000 |
commit | 8fc3c6c093ce2c693782f9d558a45693176702b9 (patch) | |
tree | 2ccdf4163860fb89f102295593fd4bd8771631f3 /llvm/lib | |
parent | bcc06085a894aa52f094e12a8cfdd36ae1f175af (diff) | |
download | bcm5719-llvm-8fc3c6c093ce2c693782f9d558a45693176702b9.tar.gz bcm5719-llvm-8fc3c6c093ce2c693782f9d558a45693176702b9.zip |
Add a comment to getNewAlignmentDiff.
llvm-svn: 217350
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp b/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp index 8b1b0ab0633..a662accf69f 100644 --- a/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp +++ b/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp @@ -96,8 +96,10 @@ FunctionPass *llvm::createAlignmentFromAssumptionsPass() { // Given an expression for the (constant) alignment, AlignSCEV, and an // expression for the displacement between a pointer and the aligned address, -// DiffSCEV, compute the alignment of the displaced pointer if it can be -// reduced to a constant. +// DiffSCEV, compute the alignment of the displaced pointer if it can be reduced +// to a constant. Using SCEV to compute alignment handles the case where +// DiffSCEV is a recurrence with constant start such that the aligned offset +// is constant. e.g. {16,+,32} % 32 -> 16. static unsigned getNewAlignmentDiff(const SCEV *DiffSCEV, const SCEV *AlignSCEV, ScalarEvolution *SE) { |