This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Add OptimizerEarly module extension point
ClosedPublic

Authored by wenju on Mar 23 2022, 1:08 AM.

Details

Summary

VectorizerStart extension is module callback in old PM, but is function
callback in new PM. We lack a module extension point between end of
buildModuleSimplificationPipeline and the function optimization
(including vectorizer) pipeline. So this patch adds a new module
extension point before the function optimization pipeline.

Diff Detail

Event Timeline

wenju created this revision.Mar 23 2022, 1:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 1:08 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
wenju requested review of this revision.Mar 23 2022, 1:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 1:08 AM
aeubanks accepted this revision.Mar 23 2022, 9:50 AM
aeubanks added inline comments.
llvm/lib/Passes/PassBuilderPipelines.cpp
1163

not sure your intended use case, but perhaps putting it after RecomputeGlobalsAAPass would give these passes better AA?

This revision is now accepted and ready to land.Mar 23 2022, 9:50 AM
wenju updated this revision to Diff 417798.Mar 23 2022, 5:52 PM

move OptimizerEarlyEPCallbacks after RecomputeGlobalsAAPass

wenju added inline comments.Mar 23 2022, 5:58 PM
llvm/lib/Passes/PassBuilderPipelines.cpp
1163

Done. Our use case is that a few module passes need to run before vectorizer.

wenju updated this revision to Diff 418091.Mar 24 2022, 5:15 PM
wenju marked an inline comment as done.

fix lit merge conflict

wenju added a comment.Mar 31 2022, 2:05 AM

RISCV LIT fails should not be related to this patch. Today I've verified this patch with check-llvm on latest llvm.

@aeubanks could you please review the new change? If it looks good, please submit for me, thank you.

oh yes still looks good, I thought you were going to land it. I can land it for you

is there a "First Last <email>" you'd like to use in the commit? arc patch isn't automatically picking that up

This revision was landed with ongoing or failed builds.Mar 31 2022, 8:22 AM
This revision was automatically updated to reflect the committed changes.

never mind, found it from one of your previous commits