From 5494cee7acd682baa0fccbd4eb6960ab1f987c1d Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Sun, 31 Jul 2016 19:25:16 +0000 Subject: [PATCH] [bugpoint] Add a -Os option git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277295 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/bugpoint/bugpoint.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index 28565f1daac..2c9fdafd90b 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/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); -- 2.11.0