This is an archive of the discontinued LLVM Phabricator instance.

Add support for new pass manager
ClosedPublic

Authored by hiraditya on Sep 30 2018, 11:35 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

hiraditya created this revision.Sep 30 2018, 11:35 PM
sebpop added a comment.Oct 1 2018, 6:48 AM

Please add a testcase that will exercise the new flag.

Please add a testcase that will exercise the new flag.

The new pass needs to be added to PassRegistry.def, then you can just test using the same test case added with your earlier patch and invoke opt a second time with "-passes=hotcoldsplit" (or whatever name you register it with) - the -passes= will use the new pass manager.

lib/Passes/PassBuilder.cpp
195 ↗(On Diff #167672)

No need to make a new new pass manager specific option here. Just share the one used by the other pass manager. Which pass manager is used by the compile will determine where it gets enabled.

hiraditya updated this revision to Diff 167940.Oct 2 2018, 7:02 AM

Modified the testcases to use both pass managers
Use single commandline flag for both pass managers.

hiraditya marked an inline comment as done.Oct 2 2018, 7:02 AM
tejohnson accepted this revision.Oct 2 2018, 8:24 AM

LGTM with one minor fix noted below. Thanks! I will give it a shot with our apps which use the new PM.

lib/Transforms/IPO/PassManagerBuilder.cpp
107 ↗(On Diff #167940)

nit: these lines now have a spurious change (line wrapping changed) which can be removed before commit.

This revision is now accepted and ready to land.Oct 2 2018, 8:24 AM
brzycki accepted this revision.Oct 2 2018, 10:11 AM

LGTM as well, provided @tejohnson 's test complete successfully.

LGTM as well, provided @tejohnson 's test complete successfully.

Clarification: I wasn't going to test until this patch was submitted. I wanted this one to go in so I can test the underlying hot cold splitting pass with the new PM. So please don't wait for me!

LGTM as well, provided @tejohnson 's test complete successfully.

Clarification: I wasn't going to test until this patch was submitted. I wanted this one to go in so I can test the underlying hot cold splitting pass with the new PM. So please don't wait for me!

If that's the case I say LGTM. :)

This revision was automatically updated to reflect the committed changes.