[PATCH] D82271: [NPM] Bail out when -foo and --passes=foo are both specified
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 08:37:05 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c56e94a9f0d: [NPM] Bail out when -foo and --passes=foo are both specified (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82271/new/
https://reviews.llvm.org/D82271
Files:
llvm/test/Other/opt-old-new-pm-passes.ll
llvm/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll
llvm/test/Transforms/IRCE/non-loop-invariant-rhs-instr.ll
llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll
llvm/test/Transforms/RewriteStatepointsForGC/relocate-invoke-result.ll
llvm/test/Transforms/RewriteStatepointsForGC/rewrite-invoke.ll
llvm/tools/opt/opt.cpp
Index: llvm/tools/opt/opt.cpp
===================================================================
--- llvm/tools/opt/opt.cpp
+++ llvm/tools/opt/opt.cpp
@@ -735,6 +735,11 @@
M->addModuleFlag(Module::Error, "EnableSplitLTOUnit", SplitLTOUnit);
if (PassPipeline.getNumOccurrences() > 0) {
+ if (PassList.size()) {
+ errs()
+ << "Cannot specify passes via both -foo-pass and --passes=foo-pass";
+ return 1;
+ }
OutputKind OK = OK_NoOutput;
if (!NoOutput)
OK = OutputAssembly
Index: llvm/test/Transforms/RewriteStatepointsForGC/rewrite-invoke.ll
===================================================================
--- llvm/test/Transforms/RewriteStatepointsForGC/rewrite-invoke.ll
+++ llvm/test/Transforms/RewriteStatepointsForGC/rewrite-invoke.ll
@@ -1,5 +1,5 @@
; RUN: opt -rewrite-statepoints-for-gc -verify -S < %s | FileCheck %s
-; RUN: opt -passes=rewrite-statepoints-for-gc -verify -S < %s | FileCheck %s
+; RUN: opt -passes=rewrite-statepoints-for-gc,verify -S < %s | FileCheck %s
declare i8 addrspace(1)* @gc_call()
Index: llvm/test/Transforms/RewriteStatepointsForGC/relocate-invoke-result.ll
===================================================================
--- llvm/test/Transforms/RewriteStatepointsForGC/relocate-invoke-result.ll
+++ llvm/test/Transforms/RewriteStatepointsForGC/relocate-invoke-result.ll
@@ -1,6 +1,6 @@
;; RUN: opt -rewrite-statepoints-for-gc -verify -S < %s | FileCheck %s
-;; RUN: opt -passes=rewrite-statepoints-for-gc -verify -S < %s | FileCheck %s
+;; RUN: opt -passes=rewrite-statepoints-for-gc,verify -S < %s | FileCheck %s
;; This test is to verify that RewriteStatepointsForGC correctly relocates values
;; defined by invoke instruction results.
Index: llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll
===================================================================
--- llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll
+++ llvm/test/Transforms/LoadStoreVectorizer/X86/codegenprepare-produced-address-math.ll
@@ -1,7 +1,6 @@
; RUN: opt -codegenprepare -load-store-vectorizer %s -S -o - | FileCheck %s
; RUN: opt -load-store-vectorizer %s -S -o - | FileCheck %s
-; RUN: opt -codegenprepare -aa-pipeline=basic-aa -passes='function(load-store-vectorizer)' %s -S -o - | FileCheck %s
-; RUN: opt -aa-pipeline=basic-aa -passes='function(load-store-vectorizer)' %s -S -o - | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes='function(load-store-vectorizer)' %s -S -o - | FileCheck %s
target triple = "x86_64--"
Index: llvm/test/Transforms/IRCE/non-loop-invariant-rhs-instr.ll
===================================================================
--- llvm/test/Transforms/IRCE/non-loop-invariant-rhs-instr.ll
+++ llvm/test/Transforms/IRCE/non-loop-invariant-rhs-instr.ll
@@ -1,6 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -irce -verify-loop-info -verify < %s 2>&1 | FileCheck %s
-; RUN: opt -S -passes=irce -verify-loop-info -verify < %s 2>&1 | FileCheck %s
+; RUN: opt -S -verify-loop-info -passes=irce,verify < %s 2>&1 | FileCheck %s
define i32 @test_01(i32 %A, i64 %Len, i32 *%array) {
; CHECK-LABEL: @test_01(
Index: llvm/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll
===================================================================
--- llvm/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll
+++ llvm/test/Transforms/IRCE/bug-loop-varying-upper-limit.ll
@@ -1,5 +1,5 @@
; RUN: opt -irce-print-changed-loops -S -verify-loop-info -irce -verify < %s 2>&1 | FileCheck %s
-; RUN: opt -irce-print-changed-loops -S -verify-loop-info -passes='require<branch-prob>,irce' -verify < %s 2>&1 | FileCheck %s
+; RUN: opt -irce-print-changed-loops -S -verify-loop-info -passes='require<branch-prob>,irce,verify' < %s 2>&1 | FileCheck %s
; CHECK-NOT: constrained loop
Index: llvm/test/Other/opt-old-new-pm-passes.ll
===================================================================
--- /dev/null
+++ llvm/test/Other/opt-old-new-pm-passes.ll
@@ -0,0 +1,2 @@
+; RUN: not opt -dce --passes=inline %s 2>&1 | FileCheck %s
+; CHECK: Cannot specify passes via both -foo-pass and --passes=foo-pass
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82271.272454.patch
Type: text/x-patch
Size: 4272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200622/c2854a5b/attachment-0001.bin>
More information about the llvm-commits
mailing list