HomePhabricator

[ICP] Don't promote when target not defined in module

Authored by tejohnson on Dec 7 2020, 5:13 PM.

Description

[ICP] Don't promote when target not defined in module

This guards against cases where the symbol was dead code eliminated in
the binary by ThinLTO, and we have a sample profile collected for one
binary but used to optimize another.

Most of the benefit from ICP comes from inlining the target, which we
can't do with only a declaration anyway. If this is in the pre-ThinLTO
link step (e.g. for instrumentation based PGO), we will attempt the
promotion again in the ThinLTO backend after importing anyway, and we
don't need the early promotion to facilitate that.

Differential Revision: https://reviews.llvm.org/D92804

Details

Committed
tejohnsonDec 8 2020, 7:45 AM
Differential Revision
D92804: [ICP] Don't promote when target not defined in module
Parents
rG02c9050155df: [mlir] Tighten access of RewritePattern methods.
Branches
Unknown
Tags
Unknown