mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some instructions are only rematerializable with specific operands, such as loads from constant pools, while others are always rematerializable. This hook allows both to be identified as being rematerializable with the same mechanism. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -336,14 +336,13 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb,
|
||||
// time we see a vreg.
|
||||
if (interval.empty()) {
|
||||
// Remember if the definition can be rematerialized. All load's from fixed
|
||||
// stack slots are re-materializable. The target may permit other loads to
|
||||
// be re-materialized as well.
|
||||
// stack slots are re-materializable. The target may permit other
|
||||
// instructions to be re-materialized as well.
|
||||
int FrameIdx = 0;
|
||||
if (vi.DefInst &&
|
||||
(tii_->isReMaterializable(vi.DefInst->getOpcode()) ||
|
||||
(tii_->isTriviallyReMaterializable(vi.DefInst) ||
|
||||
(tii_->isLoadFromStackSlot(vi.DefInst, FrameIdx) &&
|
||||
mf_->getFrameInfo()->isFixedObjectIndex(FrameIdx)) ||
|
||||
tii_->isOtherReMaterializableLoad(vi.DefInst)))
|
||||
mf_->getFrameInfo()->isFixedObjectIndex(FrameIdx))))
|
||||
interval.remat = vi.DefInst;
|
||||
|
||||
// Get the Idx of the defining instructions.
|
||||
|
Reference in New Issue
Block a user