LLVM API Documentation
#include <LoopPass.h>
Public Member Functions | |
LoopPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &O, const std::string &Banner) const override |
virtual bool | runOnLoop (Loop *L, LPPassManager &LPM)=0 |
virtual bool | doInitialization (Loop *L, LPPassManager &LPM) |
virtual bool | doFinalization () |
void | preparePassManager (PMStack &PMS) override |
Check if available pass managers are suitable for this pass or not. | |
void | assignPassManager (PMStack &PMS, PassManagerType PMT) override |
Assign pass manager to manage this pass. | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. | |
virtual void | cloneBasicBlockAnalysis (BasicBlock *F, BasicBlock *T, Loop *L) |
virtual void | deleteAnalysisValue (Value *V, Loop *L) |
deleteAnalysisValue - Delete analysis info associated with value V. | |
Protected Member Functions | |
bool | skipOptnoneFunction (const Loop *L) const |
Definition at line 29 of file LoopPass.h.
llvm::LoopPass::LoopPass | ( | char & | pid | ) | [inline, explicit] |
Definition at line 31 of file LoopPass.h.
void LoopPass::assignPassManager | ( | PMStack & | PMS, |
PassManagerType | PMT | ||
) | [override, virtual] |
Assign pass manager to manage this pass.
Reimplemented from llvm::Pass.
Definition at line 342 of file LoopPass.cpp.
References llvm::PMDataManager::add(), llvm::PMTopLevelManager::addIndirectPassManager(), llvm::PMStack::empty(), llvm::LPPassManager::getAsPass(), llvm::PMDataManager::getPassManagerType(), P, llvm::PMT_LoopPassManager, llvm::PMStack::pop(), llvm::PMDataManager::populateInheritedAnalysis(), llvm::PMStack::push(), llvm::PMTopLevelManager::schedulePass(), and llvm::PMStack::top().
virtual void llvm::LoopPass::cloneBasicBlockAnalysis | ( | BasicBlock * | F, |
BasicBlock * | T, | ||
Loop * | L | ||
) | [inline, virtual] |
SimpleAnalysis - Provides simple interface to update analysis info maintained by various passes. Note, if required this interface can be extracted into a separate abstract class but it would require additional use of multiple inheritance in Pass class hierarchy, something we are trying to avoid. Each loop pass can override these simple analysis hooks to update desired analysis information. cloneBasicBlockAnalysis - Clone analysis info associated with basic block.
Definition at line 80 of file LoopPass.h.
Referenced by llvm::LPPassManager::cloneBasicBlockSimpleAnalysis().
Pass * LoopPass::createPrinterPass | ( | raw_ostream & | O, |
const std::string & | Banner | ||
) | const [override, virtual] |
getPrinterPass - Get a pass to print the function corresponding to a Loop.
Implements llvm::Pass.
Definition at line 315 of file LoopPass.cpp.
virtual void llvm::LoopPass::deleteAnalysisValue | ( | Value * | V, |
Loop * | L | ||
) | [inline, virtual] |
deleteAnalysisValue - Delete analysis info associated with value V.
Definition at line 83 of file LoopPass.h.
Referenced by llvm::LPPassManager::deleteSimpleAnalysisValue().
virtual bool llvm::LoopPass::doFinalization | ( | ) | [inline, virtual] |
Definition at line 52 of file LoopPass.h.
Referenced by llvm::LPPassManager::runOnFunction().
virtual bool llvm::LoopPass::doInitialization | ( | Loop * | L, |
LPPassManager & | LPM | ||
) | [inline, virtual] |
Definition at line 46 of file LoopPass.h.
Referenced by llvm::LPPassManager::runOnFunction().
PassManagerType llvm::LoopPass::getPotentialPassManagerType | ( | ) | const [inline, override, virtual] |
Return what kind of Pass Manager can manage this pass.
Reimplemented from llvm::Pass.
Definition at line 66 of file LoopPass.h.
References llvm::PMT_LoopPassManager.
void LoopPass::preparePassManager | ( | PMStack & | ) | [override, virtual] |
Check if available pass managers are suitable for this pass or not.
Reimplemented from llvm::Pass.
Definition at line 326 of file LoopPass.cpp.
References llvm::PMStack::empty(), llvm::PMDataManager::getPassManagerType(), llvm::PMT_LoopPassManager, llvm::PMStack::pop(), llvm::PMDataManager::preserveHigherLevelAnalysis(), and llvm::PMStack::top().
virtual bool llvm::LoopPass::runOnLoop | ( | Loop * | L, |
LPPassManager & | LPM | ||
) | [pure virtual] |
Referenced by llvm::LPPassManager::runOnFunction().
bool LoopPass::skipOptnoneFunction | ( | const Loop * | L | ) | const [protected] |
skipOptnoneFunction - Containing function has Attribute::OptimizeNone and most transformation passes should skip it.
Definition at line 379 of file LoopPass.cpp.
References llvm::dbgs(), DEBUG, F(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::Value::getName(), llvm::BasicBlock::getParent(), llvm::Pass::getPassName(), llvm::Function::hasFnAttribute(), and llvm::Attribute::OptimizeNone.