This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC][NFC] Added `getDefMIPostRA` method so that other methods don't need to implement it repeatedly
ClosedPublic

Authored by lkail on Jul 22 2019, 10:20 PM.

Details

Summary

In PostRA phase, we often have to find out the most recent definition of a register.
This patch adds getDefMIPostRA so that other methods can use it rather than implementing it repeatedly.

Diff Detail

Repository
rL LLVM

Event Timeline

lkail created this revision.Jul 22 2019, 10:20 PM
lkail retitled this revision from [PowerPC] Added `getDefMIPostRA` method so that other methods don't need to implement it repeatedly to [PowerPC][NFC] Added `getDefMIPostRA` method so that other methods don't need to implement it repeatedly.Jul 22 2019, 10:20 PM
shchenz accepted this revision.Jul 24 2019, 11:54 PM

LGTM.
Please fix the minor comments when commit this.

llvm/lib/Target/PowerPC/PPCInstrInfo.h
143 ↗(On Diff #211249)

MI -> \p MI
Reg -> \p Reg

144 ↗(On Diff #211249)

SeenIntermediate -> \p SeenIntermediateUse
is set -> is set to?
MI -> \p MI

This revision is now accepted and ready to land.Jul 24 2019, 11:54 PM
This revision was automatically updated to reflect the committed changes.
lkail added a comment.Jul 25 2019, 2:54 AM

FYI, I should have make getDefMIPostRA public. So I committed another NFC patch to make getDefMIPostRA public. https://reviews.llvm.org/rG985e52a4c1c6