20 #define DEBUG_TYPE "regionpassmgr"
32 skipThisRegion =
false;
33 redoThisRegion =
false;
54 RI = &getAnalysis<RegionInfo>();
66 for (std::deque<Region *>::const_iterator
I = RQ.begin(), E = RQ.end();
78 CurrentRegion = RQ.back();
79 skipThisRegion =
false;
80 redoThisRegion =
false;
101 skipThisRegion ?
"<deleted>" :
105 if (!skipThisRegion) {
123 skipThisRegion ?
"<deleted>" :
145 RQ.push_back(CurrentRegion);
159 dbgs() <<
"\nRegion tree of function " << F.
getName()
160 <<
" after all region Pass:\n";
170 errs().
indent(Offset*2) <<
"Region Pass Manager\n";
189 PrintRegionPass(
const std::string &B,
raw_ostream &o)
221 while (!PMS.
empty() &&
238 while (!PMS.
empty() &&
249 assert (!PMS.
empty() &&
"Unable to create Region Pass Manager");
273 const std::string &Banner)
const {
274 return new PrintRegionPass(Banner, O);
bool preserveHigherLevelAnalysis(Pass *P)
void getAnalysisUsage(AnalysisUsage &Info) const
Pass Manager itself does not invalidate any analysis info.
void dumpLastUses(Pass *P, unsigned Offset) const
virtual void dumpPassStructure(unsigned Offset=0)
std::string getNameStr() const
Returns the name of the Region.
block_iterator block_begin()
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
BasicBlock * getEntry() const
Get the entry BasicBlock of the Region.
void dumpRequiredSet(const Pass *P) const
void dumpPassInfo(Pass *P, enum PassDebuggingString S1, enum PassDebuggingString S2, StringRef Msg)
The pass manager to schedule RegionPasses.
virtual PassManagerType getPassManagerType() const
Timer * getPassTimer(Pass *)
If TimingInfo is enabled then start pass timer.
StringRef getName() const
void schedulePass(Pass *P)
AnalysisUsage & addRequired()
void freePass(Pass *P, StringRef Msg, enum PassDebuggingString)
Remove P.
virtual bool doInitialization(Region *R, RGPassManager &RGM)
void verifyPreservedAnalysis(Pass *P)
verifyPreservedAnalysis – Verify analysis presreved by pass P.
void populateInheritedAnalysis(PMStack &PMS)
block_iterator block_end()
void initializeAnalysisImpl(Pass *P)
ID
LLVM Calling Convention Representation.
RegionSet::iterator iterator
void add(Pass *P, bool ProcessAnalysis=true)
virtual void assignPassManager(PMStack &PMS, PassManagerType PMT=PMT_RegionPassManager)
Assign pass manager to manage this pass.
unsigned getNumContainedPasses() const
virtual bool doFinalization()
void dumpPreservedSet(const Pass *P) const
A pass that runs on each Region in a function.
void addIndirectPassManager(PMDataManager *Manager)
A single entry single exit Region.
Pass * getContainedPass(unsigned N)
Get passes contained by this manager.
void dumpPassStructure(unsigned Offset)
Print passes managed by this manager.
void recordAvailableAnalysis(Pass *P)
Augment AvailableAnalysis by adding analysis made available by pass P.
void removeNotPreservedAnalysis(Pass *P)
Remove Analysis that is not preserved by the pass.
Region * getTopLevelRegion() const
static void addRegionIntoQueue(Region *R, std::deque< Region * > &RQ)
void removeDeadPasses(Pass *P, StringRef Msg, enum PassDebuggingString)
Remove dead passes used by P.
raw_ostream & dbgs()
dbgs - Return a circular-buffered debug stream.
bool runOnFunction(Function &F)
Execute all of the passes scheduled for execution.
PMDataManager * top() const
void clearNodeCache()
Clear the Node Cache for all Regions.
virtual bool runOnRegion(Region *R, RGPassManager &RGM)=0
Run the pass on a specific Region.
void push(PMDataManager *PM)
Pass * createPrinterPass(raw_ostream &O, const std::string &Banner) const
Get a pass to print the LLVM IR in the region.
void verifyRegion() const
Verify if the region is a correct region.
void preparePassManager(PMStack &PMS)
Check if available pass managers are suitable for this pass or not.
static RegisterPass< NVPTXAllocaHoisting > X("alloca-hoisting","Hoisting alloca instructions in non-entry ""blocks to the entry block")
Analysis that detects all canonical Regions.