projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LoopRotate: Reorder some method implementations. NFC
[oota-llvm.git]
/
lib
/
Transforms
/
Scalar
/
FlattenCFGPass.cpp
diff --git
a/lib/Transforms/Scalar/FlattenCFGPass.cpp
b/lib/Transforms/Scalar/FlattenCFGPass.cpp
index 0430c1898c8d32f824058bea93e9c1e67f364049..185cdbdda37811501f5eb2e0ffaec5876a931011 100644
(file)
--- a/
lib/Transforms/Scalar/FlattenCFGPass.cpp
+++ b/
lib/Transforms/Scalar/FlattenCFGPass.cpp
@@
-30,7
+30,7
@@
public:
bool runOnFunction(Function &F) override;
void getAnalysisUsage(AnalysisUsage &AU) const override {
bool runOnFunction(Function &F) override;
void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.addRequired<A
liasAnalysi
s>();
+ AU.addRequired<A
AResultsWrapperPas
s>();
}
private:
}
private:
@@
-41,7
+41,7
@@
private:
char FlattenCFGPass::ID = 0;
INITIALIZE_PASS_BEGIN(FlattenCFGPass, "flattencfg", "Flatten the CFG", false,
false)
char FlattenCFGPass::ID = 0;
INITIALIZE_PASS_BEGIN(FlattenCFGPass, "flattencfg", "Flatten the CFG", false,
false)
-INITIALIZE_
AG_DEPENDENCY(AliasAnalysi
s)
+INITIALIZE_
PASS_DEPENDENCY(AAResultsWrapperPas
s)
INITIALIZE_PASS_END(FlattenCFGPass, "flattencfg", "Flatten the CFG", false,
false)
INITIALIZE_PASS_END(FlattenCFGPass, "flattencfg", "Flatten the CFG", false,
false)
@@
-59,7
+59,7
@@
static bool iterativelyFlattenCFG(Function &F, AliasAnalysis *AA) {
// Loop over all of the basic blocks and remove them if they are unneeded...
//
for (Function::iterator BBIt = F.begin(); BBIt != F.end();) {
// Loop over all of the basic blocks and remove them if they are unneeded...
//
for (Function::iterator BBIt = F.begin(); BBIt != F.end();) {
- if (FlattenCFG(BBIt++, AA)) {
+ if (FlattenCFG(
&*
BBIt++, AA)) {
LocalChange = true;
}
}
LocalChange = true;
}
}
@@
-69,7
+69,7
@@
static bool iterativelyFlattenCFG(Function &F, AliasAnalysis *AA) {
}
bool FlattenCFGPass::runOnFunction(Function &F) {
}
bool FlattenCFGPass::runOnFunction(Function &F) {
- AA = &getAnalysis<A
liasAnalysis>
();
+ AA = &getAnalysis<A
AResultsWrapperPass>().getAAResults
();
bool EverChanged = false;
// iterativelyFlattenCFG can make some blocks dead.
while (iterativelyFlattenCFG(F, AA)) {
bool EverChanged = false;
// iterativelyFlattenCFG can make some blocks dead.
while (iterativelyFlattenCFG(F, AA)) {