This is an archive of the discontinued LLVM Phabricator instance.

Provide basic LTO extension points
ClosedPublic

Authored by serge-sans-paille on May 9 2019, 8:51 AM.

Details

Summary

There is no extension point for LTO passes, this patch provides two basic extension points. They don't apply to ThinLTO but it's a debatable question.

Diff Detail

Repository
rL LLVM

Event Timeline

(Patch is missing context)

Sorry I missed this when you sent it the first time.

I wonder if the LTO pass pipeline shouldn't honor the existing EP_EarlyAsPossible extension point?

Diff updated with context

I wonder if the LTO pass pipeline shouldn't honor the existing EP_EarlyAsPossible extension point?

EP_EarlyAsPossible is referenced by populateFunctionPassManager which seems to be called wathever the optimization level, but maybe you're proposing to have it applied twice, once for compilation unit level, and once for link level?
If that's the case, I find it confusing, and EP_LinkTimeOptimizationEarly would play that role.

mehdi_amini accepted this revision.Jun 23 2019, 5:35 PM

Sorry I missed the previous updates.

llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h
122

I think FullLTO should appear in the name to make it clear that it does not apply to thin

This revision is now accepted and ready to land.Jun 23 2019, 5:35 PM
This revision was automatically updated to reflect the committed changes.
xbolva00 added a subscriber: xbolva00.EditedJul 2 2019, 10:23 AM

This seems interesting, maybe you could add more docs/tutorial how to use it? :)
And possibly mention it in release news ?