forked from OSchip/llvm-project
reduce indentation by using an early exit, and add a comment,
no functionality change. llvm-svn: 82290
This commit is contained in:
parent
8c33d67fbf
commit
b069ec63a4
|
@ -80,6 +80,8 @@ namespace llvm {
|
|||
}
|
||||
}
|
||||
|
||||
/// createStandardModulePasses - Add the standard module passes. This is
|
||||
/// expected to be run after the standard function passes.
|
||||
static inline void createStandardModulePasses(PassManager *PM,
|
||||
unsigned OptimizationLevel,
|
||||
bool OptimizeSize,
|
||||
|
@ -91,7 +93,9 @@ namespace llvm {
|
|||
if (OptimizationLevel == 0) {
|
||||
if (InliningPass)
|
||||
PM->add(InliningPass);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (UnitAtATime)
|
||||
PM->add(createRaiseAllocationsPass()); // call %malloc -> malloc inst
|
||||
PM->add(createCFGSimplificationPass()); // Clean up disgusting code
|
||||
|
@ -155,7 +159,6 @@ namespace llvm {
|
|||
if (OptimizationLevel > 1 && UnitAtATime)
|
||||
PM->add(createConstantMergePass()); // Merge dup global constants
|
||||
}
|
||||
}
|
||||
|
||||
static inline void addOnePass(PassManager *PM, Pass *P, bool AndVerify) {
|
||||
PM->add(P);
|
||||
|
|
Loading…
Reference in New Issue