[PATCH] D83367: [NewPM][opt] Translate "-O#" to NPM's "default<O#>"
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 09:01:37 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3f17332aa715: [NewPM][opt] Translate "-O#" to NPM's "default<O#>" (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83367/new/
https://reviews.llvm.org/D83367
Files:
llvm/test/Other/opt-hot-cold-split.ll
llvm/tools/opt/opt.cpp
Index: llvm/tools/opt/opt.cpp
===================================================================
--- llvm/tools/opt/opt.cpp
+++ llvm/tools/opt/opt.cpp
@@ -746,6 +746,18 @@
for (const auto &P : PassList) {
Passes.push_back(P->getPassArgument());
}
+ if (OptLevelO0)
+ Passes.push_back("default<O0>");
+ if (OptLevelO1)
+ Passes.push_back("default<O1>");
+ if (OptLevelO2)
+ Passes.push_back("default<O2>");
+ if (OptLevelO3)
+ Passes.push_back("default<O3>");
+ if (OptLevelOs)
+ Passes.push_back("default<Os>");
+ if (OptLevelOz)
+ Passes.push_back("default<Oz>");
OutputKind OK = OK_NoOutput;
if (!NoOutput)
OK = OutputAssembly
Index: llvm/test/Other/opt-hot-cold-split.ll
===================================================================
--- llvm/test/Other/opt-hot-cold-split.ll
+++ llvm/test/Other/opt-hot-cold-split.ll
@@ -1,8 +1,8 @@
; RUN: opt -mtriple=x86_64-- -Os -hot-cold-split=true -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=DEFAULT-Os
-; RUN: opt -mtriple=x86_64-- -Os -hot-cold-split=true -passes='lto-pre-link<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=LTO-PRELINK-Os
-; RUN: opt -mtriple=x86_64-- -Os -hot-cold-split=true -passes='thinlto-pre-link<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=THINLTO-PRELINK-Os
-; RUN: opt -mtriple=x86_64-- -Os -hot-cold-split=true -passes='lto<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=LTO-POSTLINK-Os
-; RUN: opt -mtriple=x86_64-- -Os -hot-cold-split=true -passes='thinlto<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=THINLTO-POSTLINK-Os
+; RUN: opt -mtriple=x86_64-- -hot-cold-split=true -passes='lto-pre-link<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=LTO-PRELINK-Os
+; RUN: opt -mtriple=x86_64-- -hot-cold-split=true -passes='thinlto-pre-link<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=THINLTO-PRELINK-Os
+; RUN: opt -mtriple=x86_64-- -hot-cold-split=true -passes='lto<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=LTO-POSTLINK-Os
+; RUN: opt -mtriple=x86_64-- -hot-cold-split=true -passes='thinlto<Os>' -debug-pass-manager < %s -o /dev/null 2>&1 | FileCheck %s -check-prefix=THINLTO-POSTLINK-Os
; REQUIRES: asserts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83367.276458.patch
Type: text/x-patch
Size: 2426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200708/cf84bc9b/attachment.bin>
More information about the llvm-commits
mailing list