summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorArtur Pilipenko <apilipenko@azulsystems.com>2018-06-25 12:58:13 +0000
committerArtur Pilipenko <apilipenko@azulsystems.com>2018-06-25 12:58:13 +0000
commitddc7f391d274b3a08594194cc2e296c4ffa2a4e7 (patch)
treefb91ab13d5eaade654b8881b07c9778f03fa2deb /llvm/lib/CodeGen/InlineSpiller.cpp
parentab52071ddddf90a21f0297e56a2986973d6afa45 (diff)
downloadbcm5719-llvm-ddc7f391d274b3a08594194cc2e296c4ffa2a4e7.tar.gz
bcm5719-llvm-ddc7f391d274b3a08594194cc2e296c4ffa2a4e7.zip
Revert change 335077 "[InlineSpiller] Fix a crash due to lack of forward progress from remat specifically for STATEPOINT"
This change caused widespread assertion failures in our downstream testing: lib/CodeGen/LiveInterval.cpp:409: bool llvm::LiveRange::overlapsFrom(const llvm::LiveRange&, llvm::LiveRange::const_iterator) const: Assertion `!empty() && "empty range"' failed. llvm-svn: 335462
Diffstat (limited to 'llvm/lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--llvm/lib/CodeGen/InlineSpiller.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp
index 56704a606a1..007e9283d83 100644
--- a/llvm/lib/CodeGen/InlineSpiller.cpp
+++ b/llvm/lib/CodeGen/InlineSpiller.cpp
@@ -215,7 +215,6 @@ private:
void eliminateRedundantSpills(LiveInterval &LI, VNInfo *VNI);
void markValueUsed(LiveInterval*, VNInfo*);
- bool canGuaranteeAssignmentAfterRemat(unsigned VReg, MachineInstr &MI);
bool reMaterializeFor(LiveInterval &, MachineInstr &MI);
void reMaterializeAll();
@@ -515,26 +514,6 @@ void InlineSpiller::markValueUsed(LiveInterval *LI, VNInfo *VNI) {
} while (!WorkList.empty());
}
-bool InlineSpiller::canGuaranteeAssignmentAfterRemat(unsigned VReg,
- MachineInstr &MI) {
- // Here's a quick explanation of the problem we're trying to handle here:
- // * There are some pseudo instructions with more vreg uses than there are
- // physical registers on the machine.
- // * This is normally handled by spilling the vreg, and folding the reload
- // into the user instruction. (Thus decreasing the number of used vregs
- // until the remainder can be assigned to physregs.)
- // * However, since we may try to spill vregs in any order, we can end up
- // trying to spill each operand to the instruction, and then rematting it
- // instead. When that happens, the new live intervals (for the remats) are
- // expected to be trivially assignable (i.e. RS_Done). However, since we
- // may have more remats than physregs, we're guaranteed to fail to assign
- // one.
- // At the moment, we only handle this for STATEPOINTs since they're the only
- // psuedo op where we've seen this. If we start seeing other instructions
- // with the same problem, we need to revisit this.
- return (MI.getOpcode() != TargetOpcode::STATEPOINT);
-}
-
/// reMaterializeFor - Attempt to rematerialize before MI instead of reloading.
bool InlineSpiller::reMaterializeFor(LiveInterval &VirtReg, MachineInstr &MI) {
// Analyze instruction
@@ -590,11 +569,6 @@ bool InlineSpiller::reMaterializeFor(LiveInterval &VirtReg, MachineInstr &MI) {
return true;
}
- // If we can't guarantee that we'll be able to actually assign the new vreg,
- // we can't remat.
- if (!canGuaranteeAssignmentAfterRemat(VirtReg.reg, MI))
- return false;
-
// Allocate a new register for the remat.
unsigned NewVReg = Edit->createFrom(Original);
OpenPOWER on IntegriCloud