Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 21e2c00

Browse files
committed
Revert "[WebAssembly] Handle debug information and virtual registers without crashing"
This reverts commit r278967, since the new test is failing when you don't build the WebAssembly target (most people, since it's off-by-default). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278973 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 302f15f commit 21e2c00

File tree

4 files changed

+3
-80
lines changed

4 files changed

+3
-80
lines changed

lib/Target/WebAssembly/WebAssemblyRegStackify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static bool HasOneUse(unsigned Reg, MachineInstr *Def,
255255
const VNInfo *DefVNI = LI.getVNInfoAt(
256256
LIS.getInstructionIndex(*Def).getRegSlot());
257257
assert(DefVNI);
258-
for (auto &I : MRI.use_nodbg_operands(Reg)) {
258+
for (auto I : MRI.use_nodbg_operands(Reg)) {
259259
const auto &Result = LI.Query(LIS.getInstructionIndex(*I.getParent()));
260260
if (Result.valueIn() == DefVNI) {
261261
if (!Result.isKill())
@@ -360,7 +360,7 @@ static bool OneUseDominatesOtherUses(unsigned Reg, const MachineOperand &OneUse,
360360
const MachineInstr *OneUseInst = OneUse.getParent();
361361
VNInfo *OneUseVNI = LI.getVNInfoBefore(LIS.getInstructionIndex(*OneUseInst));
362362

363-
for (const MachineOperand &Use : MRI.use_nodbg_operands(Reg)) {
363+
for (const MachineOperand &Use : MRI.use_operands(Reg)) {
364364
if (&Use == &OneUse)
365365
continue;
366366

lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ bool WebAssemblyReplacePhysRegs::runOnMachineFunction(MachineFunction &MF) {
8888
if (VReg == WebAssembly::NoRegister)
8989
VReg = MRI.createVirtualRegister(RC);
9090
MO.setReg(VReg);
91-
if (MO.getParent()->isDebugValue())
92-
MO.setIsDebug();
9391
Changed = true;
9492
}
9593
}

lib/Target/WebAssembly/WebAssemblyStoreResults.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static bool ReplaceDominatedUses(MachineBasicBlock &MBB, MachineInstr &MI,
9090

9191
SmallVector<SlotIndex, 4> Indices;
9292

93-
for (auto I = MRI.use_nodbg_begin(FromReg), E = MRI.use_nodbg_end(); I != E;) {
93+
for (auto I = MRI.use_begin(FromReg), E = MRI.use_end(); I != E;) {
9494
MachineOperand &O = *I++;
9595
MachineInstr *Where = O.getParent();
9696

test/DebugInfo/WebAssembly/dbg-declare.ll

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)