mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[bugpoint] Add a -Os option
llvm-svn: 277295
This commit is contained in:
parent
77f9491e47
commit
5937e5d842
@ -74,6 +74,10 @@ static cl::opt<bool>
|
||||
OptLevelO2("O2",
|
||||
cl::desc("Optimization level 2. Identical to 'opt -O2'"));
|
||||
|
||||
static cl::opt<bool>
|
||||
OptLevelOs("Os",
|
||||
cl::desc("Like -O2 with extra optimizations for size. Similar to clang -Os"));
|
||||
|
||||
static cl::opt<bool>
|
||||
OptLevelO3("O3",
|
||||
cl::desc("Optimization level 3. Identical to 'opt -O3'"));
|
||||
@ -176,8 +180,8 @@ int main(int argc, char **argv) {
|
||||
PassManagerBuilder Builder;
|
||||
if (OptLevelO1)
|
||||
Builder.Inliner = createAlwaysInlinerPass();
|
||||
else if (OptLevelO2)
|
||||
Builder.Inliner = createFunctionInliningPass(225);
|
||||
else if (OptLevelOs || OptLevelO2)
|
||||
Builder.Inliner = createFunctionInliningPass(2, OptLevelOs ? 1 : 0);
|
||||
else
|
||||
Builder.Inliner = createFunctionInliningPass(275);
|
||||
Builder.populateFunctionPassManager(PM);
|
||||
|
Loading…
Reference in New Issue
Block a user