HomePhabricator

[Inline] Introduce Constant::hasOneLiveUse, use it instead of hasOneUse in…

Authored by erikdesjardins on Oct 7 2021, 8:14 AM.

Description

[Inline] Introduce Constant::hasOneLiveUse, use it instead of hasOneUse in inline cost model (PR51667)

Otherwise, inlining costs may be pessimized by dead constants.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51667.

Reviewed By: mtrofin, aeubanks

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