This is an archive of the discontinued LLVM Phabricator instance.

[MachineLICM] NFC - add a target hook shouldHoistCheapInstructions for machine licm to hoist cheap instruction
AbandonedPublic

Authored by shchenz on Jun 24 2020, 1:59 AM.

Details

Reviewers
hfinkel
jsji
nemanjai
efriedma
arsenm
qcolombet
dmgreen
Group Reviewers
Restricted Project
Summary

Currently, Machine LICM always doesn't hoist cheap instruction. This is not true for some targets, like PowerPC.
On PowerPC, if register pressure is allowed, we prefer to hoist even cheap instruction outside of loop.
This patch is to add a hook for the target to choose hoisting policy for cheap instructions.

Diff Detail

Event Timeline

shchenz created this revision.Jun 24 2020, 1:59 AM
This comment was removed by shchenz.
shchenz edited the summary of this revision. (Show Details)Jun 24 2020, 2:00 AM
shchenz retitled this revision from [PowerPC] add a target hook shouldHoistCheapInstructions for machine licm to hoist cheap instruction on PowerPC to [MachineLICM] add a target hook shouldHoistCheapInstructions for machine licm to hoist cheap instruction, NFC.Jun 28 2020, 1:20 AM
shchenz edited the summary of this revision. (Show Details)
shchenz added reviewers: efriedma, arsenm, qcolombet, dmgreen.
shchenz updated this revision to Diff 273907.Jun 28 2020, 1:20 AM
shchenz retitled this revision from [MachineLICM] add a target hook shouldHoistCheapInstructions for machine licm to hoist cheap instruction, NFC to [MachineLICM] NFC - add a target hook shouldHoistCheapInstructions for machine licm to hoist cheap instruction.
shchenz abandoned this revision.Jul 7 2020, 5:37 PM

we decide to use another solution in https://reviews.llvm.org/D82709, so this NFC should not need any more.