[llvm-branch-commits] [llvm-branch] r89126 - /llvm/branches/Apple/Leela/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Jim Grosbach
grosbach at apple.com
Tue Nov 17 11:18:22 PST 2009
Author: grosbach
Date: Tue Nov 17 13:18:22 2009
New Revision: 89126
URL: http://llvm.org/viewvc/llvm-project?rev=89126&view=rev
Log:
merge 89123
Modified:
llvm/branches/Apple/Leela/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/branches/Apple/Leela/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=89126&r1=89125&r2=89126&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/branches/Apple/Leela/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Nov 17 13:18:22 2009
@@ -163,7 +163,8 @@
void StrengthReduceIVUsers(Loop *L);
ICmpInst *ChangeCompareStride(Loop *L, ICmpInst *Cond,
- IVStrideUse* &CondUse, const SCEV* &CondStride,
+ IVStrideUse* &CondUse,
+ const SCEV* &CondStride,
bool PostPass = false);
bool FindIVUserForCond(ICmpInst *Cond, IVStrideUse *&CondUse,
@@ -1137,8 +1138,8 @@
}
/// CollectIVUsers - Transform our list of users and offsets to a bit more
-/// complex table. In this new vector, each 'BasedUser' contains 'Base', the base
-/// of the strided accesses, as well as the old information from Uses. We
+/// complex table. In this new vector, each 'BasedUser' contains 'Base', the
+/// base of the strided accesses, as well as the old information from Uses. We
/// progressively move information from the Base field to the Imm field, until
/// we eventually have the full access expression to rewrite the use.
const SCEV *LoopStrengthReduce::CollectIVUsers(const SCEV *const &Stride,
@@ -1517,9 +1518,10 @@
/// StrengthReduceIVUsersOfStride - Strength reduce all of the users of a single
/// stride of IV. All of the users may have different starting values, and this
/// may not be the only stride.
-void LoopStrengthReduce::StrengthReduceIVUsersOfStride(const SCEV *const &Stride,
- IVUsersOfOneStride &Uses,
- Loop *L) {
+void
+LoopStrengthReduce::StrengthReduceIVUsersOfStride(const SCEV *const &Stride,
+ IVUsersOfOneStride &Uses,
+ Loop *L) {
// If all the users are moved to another stride, then there is nothing to do.
if (Uses.Users.empty())
return;
@@ -1818,8 +1820,9 @@
/// FindIVUserForCond - If Cond has an operand that is an expression of an IV,
/// set the IV user and stride information and return true, otherwise return
/// false.
-bool LoopStrengthReduce::FindIVUserForCond(ICmpInst *Cond, IVStrideUse *&CondUse,
- const SCEV* &CondStride) {
+bool LoopStrengthReduce::FindIVUserForCond(ICmpInst *Cond,
+ IVStrideUse *&CondUse,
+ const SCEV* &CondStride) {
for (unsigned Stride = 0, e = IU->StrideOrder.size();
Stride != e && !CondUse; ++Stride) {
std::map<const SCEV *, IVUsersOfOneStride *>::iterator SI =
More information about the llvm-branch-commits
mailing list