This is an archive of the discontinued LLVM Phabricator instance.

[polly][NewPM][test] Fix polly tests under -enable-new-pm
ClosedPublic

Authored by aeubanks on Jan 7 2021, 2:04 PM.

Details

Summary

In preparation for turning on opt's -enable-new-pm by default, this pins
uses of passes via the legacy "opt -passname" with pass names beginning
with "polly-" or "polyhedral-" to the legacy PM. Many of these tests use
-analyze, which isn't supported in the new PM.

(This doesn't affect uses of "opt -passes=passname").

Diff Detail

Event Timeline

aeubanks created this revision.Jan 7 2021, 2:04 PM
aeubanks requested review of this revision.Jan 7 2021, 2:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2021, 2:04 PM
bollu removed a reviewer: bollu.Jan 15 2021, 8:42 PM
Meinersbur accepted this revision.Jan 19 2021, 12:22 PM

Note that for same passes, there Polly has NPM equivalents. E.g. -polly-prepare has -passes=polly-prepare, -polly-scops has -passes='scop(print<polly-scops>)'.

Assuming this is the accepted workaround for the NPM transition (I personally think it is ugly), this looks fine for the Polly side of things.

llvm/tools/opt/opt.cpp
484

The only pass with polyhedral- prefix is polyhedral-info, i.e. could be added to PassNameExact.

polly/test/ScopInfo/phi_not_grouped_at_top.ll
1

This test doesn't anything. It once used the -polly-prepare which has been erroneously removed in rL240766. I suggest to re-add it again, although the code this was testing was removed since, making the entire test obsolete.

This revision is now accepted and ready to land.Jan 19 2021, 12:22 PM
aeubanks updated this revision to Diff 317655.Jan 19 2021, 12:35 PM

address comments

aeubanks marked 2 inline comments as done.Jan 19 2021, 12:36 PM

Note that for same passes, there Polly has NPM equivalents. E.g. -polly-prepare has -passes=polly-prepare, -polly-scops has -passes='scop(print<polly-scops>)'.

Assuming this is the accepted workaround for the NPM transition (I personally think it is ugly), this looks fine for the Polly side of things.

I agree it's ugly, but it allows us to update the polly tests to use the new PM in parallel with the new PM switch.

LGTM. Thanks for the changes.

This revision was landed with ongoing or failed builds.Jan 19 2021, 12:39 PM
This revision was automatically updated to reflect the committed changes.