This is an archive of the discontinued LLVM Phabricator instance.

[NewPM][opt] Revert to legacy PM when any codegen passes are specified
ClosedPublic

Authored by aeubanks on Jul 29 2020, 9:59 AM.

Details

Summary

This reduces the number of check-llvm failures by 500.

Ideally we'd have a codegen version of PassRegistry.def, or have all the
codegen passes ported and put into PassRegistry.def. But since that
doesn't exist yet, hardcode the list of codegen IR passes.

There are still codegen passes missing from this list, I'll add them
later as I stumble upon them.

Diff Detail

Event Timeline

aeubanks created this revision.Jul 29 2020, 9:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2020, 9:59 AM
aeubanks requested review of this revision.Jul 29 2020, 9:59 AM
ychen added inline comments.Jul 29 2020, 10:25 AM
llvm/tools/opt/opt.cpp
493

PassSets = {"a", "b"};
Passes = {"pa", "pb"};
for (P : PassSets)

Pass.startswith

for (P : Passes)

Pass == P
723–728

Probably add comments about the effects of -enable-new-pm(on/off), -run-pass, -passes(opt/codegen pass), and the combination of them.

aeubanks updated this revision to Diff 281689.Jul 29 2020, 11:33 AM

Address code review comments

ychen accepted this revision.Jul 29 2020, 11:54 AM
ychen added inline comments.
llvm/tools/opt/opt.cpp
493

clang-format?

This revision is now accepted and ready to land.Jul 29 2020, 11:54 AM
aeubanks added inline comments.Jul 29 2020, 12:03 PM
llvm/tools/opt/opt.cpp
493

That's what clang-format did
¯\_(ツ)_/¯

asbirlea added inline comments.Jul 29 2020, 12:38 PM
llvm/tools/opt/opt.cpp
505

nit: remove braces?

aeubanks updated this revision to Diff 281713.Jul 29 2020, 1:13 PM

Remove braces

This revision was landed with ongoing or failed builds.Jul 29 2020, 1:55 PM
This revision was automatically updated to reflect the committed changes.