summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-07-31 19:25:16 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-07-31 19:25:16 +0000
commit26bdcaf4d216f2eadfd2b7ec86382f253daf265e (patch)
tree1d79a49857b89de924b112758aa882b0a2b04e97 /llvm/tools/bugpoint
parent0b2d71373b91f4bf1b0f832ef3e3ab85c3bb1446 (diff)
downloadbcm5719-llvm-26bdcaf4d216f2eadfd2b7ec86382f253daf265e.tar.gz
bcm5719-llvm-26bdcaf4d216f2eadfd2b7ec86382f253daf265e.zip
[bugpoint] Add a -Os option
llvm-svn: 277295
Diffstat (limited to 'llvm/tools/bugpoint')
-rw-r--r--llvm/tools/bugpoint/bugpoint.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp
index 28565f1daac..2c9fdafd90b 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<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);
OpenPOWER on IntegriCloud