mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
reduce indentation by using an early exit, and add a comment,
no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82290 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e31e4e51a9
commit
d7a5983e48
@ -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,
|
static inline void createStandardModulePasses(PassManager *PM,
|
||||||
unsigned OptimizationLevel,
|
unsigned OptimizationLevel,
|
||||||
bool OptimizeSize,
|
bool OptimizeSize,
|
||||||
@ -91,7 +93,9 @@ namespace llvm {
|
|||||||
if (OptimizationLevel == 0) {
|
if (OptimizationLevel == 0) {
|
||||||
if (InliningPass)
|
if (InliningPass)
|
||||||
PM->add(InliningPass);
|
PM->add(InliningPass);
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (UnitAtATime)
|
if (UnitAtATime)
|
||||||
PM->add(createRaiseAllocationsPass()); // call %malloc -> malloc inst
|
PM->add(createRaiseAllocationsPass()); // call %malloc -> malloc inst
|
||||||
PM->add(createCFGSimplificationPass()); // Clean up disgusting code
|
PM->add(createCFGSimplificationPass()); // Clean up disgusting code
|
||||||
@ -155,7 +159,6 @@ namespace llvm {
|
|||||||
if (OptimizationLevel > 1 && UnitAtATime)
|
if (OptimizationLevel > 1 && UnitAtATime)
|
||||||
PM->add(createConstantMergePass()); // Merge dup global constants
|
PM->add(createConstantMergePass()); // Merge dup global constants
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static inline void addOnePass(PassManager *PM, Pass *P, bool AndVerify) {
|
static inline void addOnePass(PassManager *PM, Pass *P, bool AndVerify) {
|
||||||
PM->add(P);
|
PM->add(P);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user