mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
- Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8291e0465b
commit
cb2610ea03
@ -61,17 +61,18 @@ public:
|
||||
|
||||
// setPreservesAll - Set by analyses that do not transform their input at all
|
||||
void setPreservesAll() { PreservesAll = true; }
|
||||
bool preservesAll() const { return PreservesAll; }
|
||||
bool getPreservesAll() const { return PreservesAll; }
|
||||
|
||||
// preservesCFG - This function should be called by the pass, iff they do not:
|
||||
//
|
||||
// 1. Add or remove basic blocks from the function
|
||||
// 2. Modify terminator instructions in any way.
|
||||
//
|
||||
// This function annotates the AnalysisUsage info object to say that analyses
|
||||
// that only depend on the CFG are preserved by this pass.
|
||||
//
|
||||
void preservesCFG();
|
||||
/// setPreservesCFG - This function should be called by the pass, iff they do
|
||||
/// not:
|
||||
///
|
||||
/// 1. Add or remove basic blocks from the function
|
||||
/// 2. Modify terminator instructions in any way.
|
||||
///
|
||||
/// This function annotates the AnalysisUsage info object to say that analyses
|
||||
/// that only depend on the CFG are preserved by this pass.
|
||||
///
|
||||
void setPreservesCFG();
|
||||
|
||||
const std::vector<AnalysisID> &getRequiredSet() const { return Required; }
|
||||
const std::vector<AnalysisID> &getPreservedSet() const { return Preserved; }
|
||||
|
@ -78,7 +78,7 @@ namespace {
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -569,7 +569,7 @@ namespace {
|
||||
virtual bool runOnFunction(Function &F) { return doRPR(F); }
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace {
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
|
||||
@ -60,7 +60,7 @@ namespace {
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -39,7 +39,7 @@ namespace {
|
||||
|
||||
// This transformation requires dominator and immediate dominator info
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<DominatorSet>();
|
||||
AU.addRequired<ImmediateDominators>();
|
||||
AU.addRequired<ValueNumbering>();
|
||||
|
@ -190,7 +190,7 @@ namespace {
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
};
|
||||
RegisterOpt<InductionVariableSimplify> X("indvars",
|
||||
|
@ -53,7 +53,7 @@ namespace {
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
|
||||
// Visitation implementation - Implement instruction combining for different
|
||||
|
@ -29,7 +29,7 @@ namespace {
|
||||
/// loop preheaders be inserted into the CFG...
|
||||
///
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequiredID(LoopPreheadersID);
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.addRequired<DominatorTree>();
|
||||
|
@ -42,7 +42,7 @@ namespace {
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequired<DominatorSet>();
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace {
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
private:
|
||||
void BuildRankMap(Function &F);
|
||||
|
@ -96,7 +96,7 @@ public:
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace {
|
||||
//
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<DominanceFrontier>();
|
||||
AU.preservesCFG();
|
||||
AU.setPreservesCFG();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -43,7 +43,7 @@ void AnalysisResolver::setAnalysisResolver(Pass *P, AnalysisResolver *AR) {
|
||||
// AnalysisUsage Class Implementation
|
||||
//
|
||||
|
||||
// preservesCFG - This function should be called to by the pass, iff they do
|
||||
// setPreservesCFG - This function should be called to by the pass, iff they do
|
||||
// not:
|
||||
//
|
||||
// 1. Add or remove basic blocks from the function
|
||||
@ -52,7 +52,7 @@ void AnalysisResolver::setAnalysisResolver(Pass *P, AnalysisResolver *AR) {
|
||||
// This function annotates the AnalysisUsage info object to say that analyses
|
||||
// that only depend on the CFG are preserved by this pass.
|
||||
//
|
||||
void AnalysisUsage::preservesCFG() {
|
||||
void AnalysisUsage::setPreservesCFG() {
|
||||
// Since this transformation doesn't modify the CFG, it preserves all analyses
|
||||
// that only depend on the CFG (like dominators, loop info, etc...)
|
||||
//
|
||||
|
@ -252,7 +252,7 @@ public:
|
||||
|
||||
|
||||
// Erase all analyses not in the preserved set...
|
||||
if (!AnUsage.preservesAll()) {
|
||||
if (!AnUsage.getPreservesAll()) {
|
||||
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
||||
for (std::map<AnalysisID, Pass*>::iterator I = CurrentAnalyses.begin(),
|
||||
E = CurrentAnalyses.end(); I != E; )
|
||||
@ -472,7 +472,7 @@ private:
|
||||
markPassUsed(*I, P); // Mark *I as used by P
|
||||
|
||||
// Erase all analyses not in the preserved set...
|
||||
if (!AnUsage.preservesAll()) {
|
||||
if (!AnUsage.getPreservesAll()) {
|
||||
const std::vector<AnalysisID> &PreservedSet = AnUsage.getPreservedSet();
|
||||
for (std::map<AnalysisID, Pass*>::iterator I = CurrentAnalyses.begin(),
|
||||
E = CurrentAnalyses.end(); I != E; ) {
|
||||
|
Loading…
Reference in New Issue
Block a user