Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,6 @@ static MachineInstr *findStartOfTree(MachineOperand &MO,
return Def;
}

// FAKE_USEs are no-ops, so remove them here so that the values used by them
// will be correctly dropped later.
static void removeFakeUses(MachineFunction &MF) {
SmallVector<MachineInstr *> ToDelete;
for (auto &MBB : MF)
for (auto &MI : MBB)
if (MI.isFakeUse())
ToDelete.push_back(&MI);
for (auto *MI : ToDelete)
MI->eraseFromParent();
}

bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) {
LLVM_DEBUG(dbgs() << "********** Make Locals Explicit **********\n"
"********** Function: "
Expand All @@ -238,8 +226,6 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) {
WebAssemblyFunctionInfo &MFI = *MF.getInfo<WebAssemblyFunctionInfo>();
const auto *TII = MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();

removeFakeUses(MF);

// Map non-stackified virtual registers to their local ids.
DenseMap<unsigned, unsigned> Reg2Local;

Expand Down
15 changes: 0 additions & 15 deletions llvm/test/CodeGen/WebAssembly/fake-use.ll

This file was deleted.