mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Allow dead insts to be kept in DeadRemat only when they are rematerializable.
Because isReallyTriviallyReMaterializableGeneric puts many limits on rematerializable instructions, this fix can prevent instructions with tied virtual operands and instructions with virtual register uses from being kept in DeadRemat, so as to workaround the live interval consistency problem for the dummy instructions kept in DeadRemat. But we still need to fix the live interval consistency problem. This patch is just a short time relieve. PR28464 has been filed as a reminder. Differential Revision: http://reviews.llvm.org/D19486 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -338,11 +338,13 @@ void SplitAnalysis::analyze(const LiveInterval *li) {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// Create a new SplitEditor for editing the LiveInterval analyzed by SA.
|
||||
SplitEditor::SplitEditor(SplitAnalysis &sa, LiveIntervals &lis, VirtRegMap &vrm,
|
||||
SplitEditor::SplitEditor(SplitAnalysis &sa, AliasAnalysis &aa,
|
||||
LiveIntervals &lis, VirtRegMap &vrm,
|
||||
MachineDominatorTree &mdt,
|
||||
MachineBlockFrequencyInfo &mbfi)
|
||||
: SA(sa), LIS(lis), VRM(vrm), MRI(vrm.getMachineFunction().getRegInfo()),
|
||||
MDT(mdt), TII(*vrm.getMachineFunction().getSubtarget().getInstrInfo()),
|
||||
: SA(sa), AA(aa), LIS(lis), VRM(vrm),
|
||||
MRI(vrm.getMachineFunction().getRegInfo()), MDT(mdt),
|
||||
TII(*vrm.getMachineFunction().getSubtarget().getInstrInfo()),
|
||||
TRI(*vrm.getMachineFunction().getSubtarget().getRegisterInfo()),
|
||||
MBFI(mbfi), Edit(nullptr), OpenIdx(0), SpillMode(SM_Partition),
|
||||
RegAssign(Allocator) {}
|
||||
@@ -1130,7 +1132,7 @@ void SplitEditor::deleteRematVictims() {
|
||||
if (Dead.empty())
|
||||
return;
|
||||
|
||||
Edit->eliminateDeadDefs(Dead);
|
||||
Edit->eliminateDeadDefs(Dead, None, &AA);
|
||||
}
|
||||
|
||||
void SplitEditor::finish(SmallVectorImpl<unsigned> *LRMap) {
|
||||
|
||||
Reference in New Issue
Block a user