[llvm] r226376 - [PM] Remove a dead field.
Chandler Carruth
chandlerc at gmail.com
Sat Jan 17 06:31:35 PST 2015
Author: chandlerc
Date: Sat Jan 17 08:31:35 2015
New Revision: 226376
URL: http://llvm.org/viewvc/llvm-project?rev=226376&view=rev
Log:
[PM] Remove a dead field.
This was dead even before I refactored how we initialized it, but my
refactoring made it trivially dead and it is now caught by a Clang
warning. This fixes the warning and should clean up the -Werror bot
failures (sorry!).
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp?rev=226376&r1=226375&r2=226376&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp Sat Jan 17 08:31:35 2015
@@ -48,7 +48,6 @@ namespace {
Loop *L;
LoopInfo *LI;
ScalarEvolution *SE;
- const DataLayout *DL; // May be NULL
SmallVectorImpl<WeakVH> &DeadInsts;
@@ -56,9 +55,8 @@ namespace {
public:
SimplifyIndvar(Loop *Loop, ScalarEvolution *SE, LoopInfo *LI,
- const DataLayout *DL, SmallVectorImpl<WeakVH> &Dead,
- IVUsers *IVU = nullptr)
- : L(Loop), LI(LI), SE(SE), DL(DL), DeadInsts(Dead), Changed(false) {
+ SmallVectorImpl<WeakVH> &Dead, IVUsers *IVU = nullptr)
+ : L(Loop), LI(LI), SE(SE), DeadInsts(Dead), Changed(false) {
assert(LI && "IV simplification requires LoopInfo");
}
@@ -557,10 +555,8 @@ void IVVisitor::anchor() { }
bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, LPPassManager *LPM,
SmallVectorImpl<WeakVH> &Dead, IVVisitor *V)
{
- DataLayoutPass *DLP = LPM->getAnalysisIfAvailable<DataLayoutPass>();
LoopInfo *LI = &LPM->getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
- SimplifyIndvar SIV(LI->getLoopFor(CurrIV->getParent()), SE, LI,
- DLP ? &DLP->getDataLayout() : nullptr, Dead);
+ SimplifyIndvar SIV(LI->getLoopFor(CurrIV->getParent()), SE, LI, Dead);
SIV.simplifyUsers(CurrIV, V);
return SIV.hasChanged();
}
More information about the llvm-commits
mailing list