This is an archive of the discontinued LLVM Phabricator instance.

[polly] Remove legacy pass manager hooks
ClosedPublic

Authored by aeubanks on Oct 24 2022, 10:13 AM.

Details

Summary

And some options that only throw errors with the new PM.

Diff Detail

Event Timeline

aeubanks created this revision.Oct 24 2022, 10:13 AM
Herald added a reviewer: ctetreau. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
aeubanks requested review of this revision.Oct 24 2022, 10:13 AM
aeubanks updated this revision to Diff 470518.Oct 25 2022, 9:03 AM

remove legacy PM tests
remove unused function

-enable-new-pm is going to be removed from opt? What is that patch doing that?

polly/test/Support/defaultpipelines.ll
0–6
Meinersbur added inline comments.Oct 26 2022, 8:52 AM
polly/lib/Support/RegisterPasses.cpp
626

b) (POSITION_AFTER_LOOPOPT is not supported by the NPM because there is no extension point). Maybe remove it entirely?

aeubanks updated this revision to Diff 470883.Oct 26 2022, 11:25 AM

address comments

-enable-new-pm is going to be removed from opt? What is that patch doing that?

it's explicitly for the legacy PM -> new PM migration, which has basically already happened. on discourse we've talked about how to deal with the option, and we're now trying to remove it

polly/lib/Support/RegisterPasses.cpp
626

done.

that extension point looks like it was specifically for loop passes, but due to the legacy PM design it's possible to add non-loop passes and have it still run like that. so perhaps not worth porting to the new PM

Some other Polly options become inaccessible using any pipeline builder: PollyACC (-polly-target), static expansion (-polly-enable-mse), polyhedral info (-polly-enable-polyhedralinfo), and JSON export (-polly-export).

-polly-target, -polly-enable-mse and -polly-enable-polyhedralinfo are experiments that are effectively unmaintained now and I think should also be removed in this patch (that is, the cl::opt options, I can remove the passes separately at some point unless someone jumps in to update them to the NPM)

I will commit a patch that makes -polly-export usable with the NPM.

polly/lib/Support/RegisterPasses.cpp
626

it's possible to add non-loop passes and have it still run like that

do you mean impossible? I can only add loop passes at that point while Polly uses function passes.

That extension point was added to the legacy pass manager by @grosser explicitly to implement -polly-position=after-loopopt. I am not aware of any other use of it.

In any case, I never used that position and therefore fine with removing it.

MaximalStaticExpansion expansion was actually already ported to the NPM in D125870. I made the NPM pass builder use it in rGb150d34c47ef.

That is, only the flags -polly-target and -polly-enable-polyhedralinfo remain to have no function without the legacy pass manager (other than throwing a fatal error) and should be removed with this patch.

aeubanks updated this revision to Diff 470963.Oct 26 2022, 4:13 PM

remove more options

aeubanks edited the summary of this revision. (Show Details)Oct 26 2022, 4:14 PM
This revision is now accepted and ready to land.Oct 27 2022, 12:27 PM
This revision was landed with ongoing or failed builds.Oct 28 2022, 10:16 AM
This revision was automatically updated to reflect the committed changes.