From: David Majnemer Date: Sun, 31 Jul 2016 19:25:16 +0000 (+0000) Subject: [bugpoint] Add a -Os option X-Git-Tag: llvmorg-4.0.0-rc1~13720 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26bdcaf4d216f2eadfd2b7ec86382f253daf265e;p=platform%2Fupstream%2Fllvm.git [bugpoint] Add a -Os option llvm-svn: 277295 --- diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp index 28565f1..2c9fdaf 100644 --- a/llvm/tools/bugpoint/bugpoint.cpp +++ b/llvm/tools/bugpoint/bugpoint.cpp @@ -75,6 +75,10 @@ OptLevelO2("O2", cl::desc("Optimization level 2. Identical to 'opt -O2'")); static cl::opt +OptLevelOs("Os", + cl::desc("Like -O2 with extra optimizations for size. Similar to clang -Os")); + +static cl::opt 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);