[llvm-dev] [MachineSinking] is this a profitable sinking?

Zheng CZ Chen via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 31 03:01:32 PDT 2020

Hi All,

For below pattern:

        InstB(has only one operand, and it is InstA)
        InstC(Only user of InstB)

Suppose bbM dominates bbN, bbN post dominates bbM and bbM & bbN are both
inside Loop1.

Is it profitable to sink InstB from bbM to bbN? Current
`isProfitableToSinkTo` will return false.

Sinking InstB to bbN can decrease the live interval for InstB but will not
impact the register pressure about InstA because InstA must be alive no
matter inside bbM or bbN due to the Loop1?

So this sinking should be profitable?


Chen Zheng
Power Compiler Backend Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200831/c3ad08e7/attachment.html>

More information about the llvm-dev mailing list