OSDN Git Service

[NPM] Bail out when -foo and --passes=foo are both specified
authorArthur Eubanks <aeubanks@google.com>
Sun, 21 Jun 2020 06:51:26 +0000 (23:51 -0700)
committerArthur Eubanks <aeubanks@google.com>
Mon, 22 Jun 2020 15:27:13 +0000 (08:27 -0700)
commit9c56e94a9f0d9a0930179e764aff7c80c793e117
tree9150d20df216315676fb500dbd6777fe3ff9c230
parentb458d8ce95115dcb98a43bfa6ba4f2f4dbc3c083
[NPM] Bail out when -foo and --passes=foo are both specified

Summary:
Currently when --passes is used, any passes specified via -foo are
ignored. Explicitly bail out when that happens.

This requires changing some tests. Most were straightforward, but
codegenprepare-produced-address-math.ll is tricky. One of its RUNs runs
CodeGenPrepare. I tried porting CodeGenPrepare to the NPM, but ended up
getting stuck when I needed a TargetMachine. NPM doesn't have support
for MachineFunctions yet. So I just deleted that RUN line, since it was
mass-added in https://reviews.llvm.org/D54848 and is likely not that
useful.

Reviewers: echristo, hans

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82271
llvm/test/Other/opt-old-new-pm-passes.ll [new file with mode: 0644]
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