This is an archive of the discontinued LLVM Phabricator instance.

[ICP] Migrate to OptimizationRemarkEmitter
ClosedPublic

Authored by anemet on Jul 26 2017, 10:22 PM.

Details

Summary

This is a module pass so for the old PM, we can't use ORE, the function
analysis pass. Instead ORE is created on the fly.

A few notes:

  • isPromotionLegal is folded in the caller since we want to emit the Function

in the remark but we can only do that if the symbol table look-up succeeded.

  • There was good test coverage for remarks in this pass.
  • promoteIndirectCall uses ORE conditionally since it's also used from

SampleProfile which does not use ORE yet.

Fixes PR33792.

Event Timeline

anemet created this revision.Jul 26 2017, 10:22 PM
davide accepted this revision.Jul 26 2017, 11:31 PM

LGTM, thanks for taking care of this one

This revision is now accepted and ready to land.Jul 26 2017, 11:31 PM
This revision was automatically updated to reflect the committed changes.