This is an archive of the discontinued LLVM Phabricator instance.

[NPM] Bail out when -foo and --passes=foo are both specified
ClosedPublic

Authored by aeubanks on Jun 21 2020, 12:08 AM.

Details

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.

Diff Detail

Event Timeline

aeubanks created this revision.Jun 21 2020, 12:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2020, 12:08 AM
hans accepted this revision.Jun 22 2020, 4:29 AM

Seems like a nice improvement to me :-)

llvm/test/Other/opt-old-new-pm-passes.ll
3

nit: missing trailing \n

This revision is now accepted and ready to land.Jun 22 2020, 4:29 AM
aeubanks updated this revision to Diff 272447.Jun 22 2020, 8:30 AM
aeubanks marked an inline comment as done.

Trailing newline
Rebase

This revision was automatically updated to reflect the committed changes.