This is an archive of the discontinued LLVM Phabricator instance.

[newpm] Add an OptimizerLast EP
ClosedPublic

Authored by philip.pfaffe on Nov 10 2018, 1:08 AM.

Details

Summary

It turns out that we need an OptimizerLast PassBuilder extension point
after all. I missed the relevance of this EP the first time. By legacy PM magic,
function passes added at this EP get added to the last _Function_ PM, which is a
feature we lost when dropping this EP for the new PM.

Diff Detail

Event Timeline

philip.pfaffe created this revision.Nov 10 2018, 1:08 AM

LGTM (though I have no idea what legacy does for this :) )

tools/opt/NewPMDriver.cpp
95

Unrelated to your fix, shouldnt this read "of the MODULE pass pipeline" ?

fedor.sergeev accepted this revision.Nov 10 2018, 2:07 AM
This revision is now accepted and ready to land.Nov 10 2018, 2:07 AM

A key difference between this and legacy is at O0, this EP won't be triggered.

A key difference between this and legacy is at O0, this EP won't be triggered.

Makes sense to mention this in commit message...

chandlerc accepted this revision.Nov 10 2018, 9:26 AM

Generally feel free to submit w/ comment and commit message updates.

(But also I want to explicitly say you don't need to wait for me on this kind of patch, very happy w/ Fedor's review.)

include/llvm/Passes/PassBuilder.h
501–502

Also mention the O0 thing here?

This revision was automatically updated to reflect the committed changes.