Page MenuHomePhabricator

Provide basic LTO extension points
AcceptedPublic

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

Details

Reviewers
mehdi_amini
pcc
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

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.Sun, Jun 23, 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.Sun, Jun 23, 5:35 PM