26 class PrintLoopPass :
public LoopPass {
84 for (std::deque<Loop *>::iterator
I = LQ.begin(),
85 E = LQ.end();
I != E; ++
I) {
96 assert (CurrentLoop != L &&
"Cannot insert CurrentLoop");
109 if (L == CurrentLoop)
116 for (std::deque<Loop *>::iterator
I = LQ.begin(),
117 E = LQ.end();
I != E; ++
I) {
132 assert (CurrentLoop == L &&
"Can redo only CurrentLoop");
148 if (
BasicBlock *BB = dyn_cast<BasicBlock>(V)) {
180 LI = &getAnalysis<LoopInfo>();
181 bool Changed =
false;
202 for (std::deque<Loop *>::const_iterator
I = LQ.begin(), E = LQ.end();
212 while (!LQ.empty()) {
214 CurrentLoop = LQ.back();
215 skipThisLoop =
false;
216 redoThisLoop =
false;
232 Changed |= P->
runOnLoop(CurrentLoop, *
this);
237 skipThisLoop ?
"<deleted>" :
259 skipThisLoop ?
"<deleted>" :
281 LQ.push_back(CurrentLoop);
295 errs().
indent(Offset*2) <<
"Loop Pass Manager\n";
308 const std::string &Banner)
const {
309 return new PrintLoopPass(Banner, O);
321 while (!PMS.
empty() &&
337 while (!PMS.
empty() &&
346 assert (!PMS.
empty() &&
"Unable to create Loop Pass Manager");
bool preserveHigherLevelAnalysis(Pass *P)
void dumpLastUses(Pass *P, unsigned Offset) const
virtual void dumpPassStructure(unsigned Offset=0)
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
void dumpRequiredSet(const Pass *P) const
LoopT * getParentLoop() const
void updateUnloop(Loop *Unloop)
void dumpPassInfo(Pass *P, enum PassDebuggingString S1, enum PassDebuggingString S2, StringRef Msg)
reverse_iterator rbegin() const
BlockT * getHeader() const
virtual PassManagerType getPassManagerType() const
Timer * getPassTimer(Pass *)
If TimingInfo is enabled then start pass timer.
void schedulePass(Pass *P)
AnalysisUsage & addRequired()
virtual void assignPassManager(PMStack &PMS, PassManagerType PMT)
Assign pass manager to manage this pass.
void freePass(Pass *P, StringRef Msg, enum PassDebuggingString)
Remove P.
void verifyPreservedAnalysis(Pass *P)
verifyPreservedAnalysis – Verify analysis presreved by pass P.
void populateInheritedAnalysis(PMStack &PMS)
void initializeAnalysisImpl(Pass *P)
ID
LLVM Calling Convention Representation.
reverse_iterator rbegin() const
bool runOnFunction(Function &F)
void add(Pass *P, bool ProcessAnalysis=true)
void addChildLoop(LoopT *NewChild)
unsigned getNumContainedPasses() const
void insertLoopIntoQueue(Loop *L)
void getAnalysisUsage(AnalysisUsage &Info) const
Pass Manager itself does not invalidate any analysis info.
void verifyLoop() const
verifyLoop - Verify loop structure
std::vector< LoopT * >::const_reverse_iterator reverse_iterator
virtual bool doInitialization(Loop *L, LPPassManager &LPM)
void insertLoop(Loop *L, Loop *ParentLoop)
void dumpPreservedSet(const Pass *P) const
LLVM Basic Block Representation.
virtual bool doFinalization()
void addIndirectPassManager(PMDataManager *Manager)
Pass * createPrinterPass(raw_ostream &O, const std::string &Banner) const
void dumpPassStructure(unsigned Offset)
Print passes managed by this manager.
LoopInfoBase< BasicBlock, Loop >::reverse_iterator reverse_iterator
void deleteSimpleAnalysisValue(Value *V, Loop *L)
deleteSimpleAnalysisValue - Invoke deleteAnalysisValue hook for all passes.
void recordAvailableAnalysis(Pass *P)
Augment AvailableAnalysis by adding analysis made available by pass P.
reverse_iterator rend() const
void removeNotPreservedAnalysis(Pass *P)
Remove Analysis that is not preserved by the pass.
void deleteLoopFromQueue(Loop *L)
Delete loop from the loop queue and loop hierarchy (LoopInfo).
void removeDeadPasses(Pass *P, StringRef Msg, enum PassDebuggingString)
Remove dead passes used by P.
virtual Pass * getAsPass()
PMDataManager * top() const
std::vector< BlockT * >::const_iterator block_iterator
virtual bool runOnLoop(Loop *L, LPPassManager &LPM)=0
block_iterator block_end() const
void preparePassManager(PMStack &PMS)
Check if available pass managers are suitable for this pass or not.
void cloneBasicBlockSimpleAnalysis(BasicBlock *From, BasicBlock *To, Loop *L)
LoopPass * getContainedPass(unsigned N)
void addTopLevelLoop(Loop *New)
void push(PMDataManager *PM)
virtual void cloneBasicBlockAnalysis(BasicBlock *F, BasicBlock *T, Loop *L)
LLVM Value Representation.
virtual void deleteAnalysisValue(Value *V, Loop *L)
deleteAnalysisValue - Delete analysis info associated with value V.
static void addLoopIntoQueue(Loop *L, std::deque< Loop * > &LQ)
block_iterator block_begin() const
static RegisterPass< NVPTXAllocaHoisting > X("alloca-hoisting","Hoisting alloca instructions in non-entry ""blocks to the entry block")
reverse_iterator rend() const