mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-25 21:46:50 +00:00
Call getAnalysis<LoopInfo> the normal way, instead of asking passed-in
LoopPassManager for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e5db7c4166
commit
6a02fc3070
@ -15,7 +15,6 @@
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/IntrinsicInst.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/LoopPass.h"
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
@ -49,6 +48,7 @@ namespace {
|
||||
AU.addRequiredID(LCSSAID);
|
||||
AU.addPreservedID(LCSSAID);
|
||||
AU.addPreserved<ScalarEvolution>();
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.addPreserved<LoopInfo>();
|
||||
AU.addPreserved<DominatorTree>();
|
||||
AU.addPreserved<DominanceFrontier>();
|
||||
@ -287,7 +287,7 @@ void LoopRotate::preserveCanonicalLoopForm(LPPassManager &LPM) {
|
||||
"bb.nph",
|
||||
OrigHeader->getParent(),
|
||||
NewHeader);
|
||||
LoopInfo &LI = LPM.getAnalysis<LoopInfo>();
|
||||
LoopInfo &LI = getAnalysis<LoopInfo>();
|
||||
if (Loop *PL = LI.getLoopFor(OrigPreHeader))
|
||||
PL->addBasicBlockToLoop(NewPreHeader, LI.getBase());
|
||||
BranchInst::Create(NewHeader, NewPreHeader);
|
||||
|
Loading…
Reference in New Issue
Block a user