diff options
Diffstat (limited to 'lib/Target/WebAssembly/WebAssemblyStoreResults.cpp')
-rw-r--r-- | lib/Target/WebAssembly/WebAssemblyStoreResults.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp b/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp index 22a5a9099e72..893e8484c4c6 100644 --- a/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp +++ b/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// /// /// \file -/// \brief This file implements an optimization pass using store result values. +/// This file implements an optimization pass using store result values. /// /// WebAssembly's store instructions return the stored value. This is to enable /// an optimization wherein uses of the stored value can be replaced by uses of @@ -68,6 +68,9 @@ private: } // end anonymous namespace char WebAssemblyStoreResults::ID = 0; +INITIALIZE_PASS(WebAssemblyStoreResults, DEBUG_TYPE, + "Optimize store result values for WebAssembly", false, false) + FunctionPass *llvm::createWebAssemblyStoreResults() { return new WebAssemblyStoreResults(); } @@ -108,8 +111,8 @@ static bool ReplaceDominatedUses(MachineBasicBlock &MBB, MachineInstr &MI, continue; Changed = true; - DEBUG(dbgs() << "Setting operand " << O << " in " << *Where << " from " - << MI << "\n"); + LLVM_DEBUG(dbgs() << "Setting operand " << O << " in " << *Where << " from " + << MI << "\n"); O.setReg(ToReg); // If the store's def was previously dead, it is no longer. @@ -167,7 +170,7 @@ static bool optimizeCall(MachineBasicBlock &MBB, MachineInstr &MI, } bool WebAssemblyStoreResults::runOnMachineFunction(MachineFunction &MF) { - DEBUG({ + LLVM_DEBUG({ dbgs() << "********** Store Results **********\n" << "********** Function: " << MF.getName() << '\n'; }); @@ -186,7 +189,7 @@ bool WebAssemblyStoreResults::runOnMachineFunction(MachineFunction &MF) { assert(MRI.tracksLiveness() && "StoreResults expects liveness tracking"); for (auto &MBB : MF) { - DEBUG(dbgs() << "Basic Block: " << MBB.getName() << '\n'); + LLVM_DEBUG(dbgs() << "Basic Block: " << MBB.getName() << '\n'); for (auto &MI : MBB) switch (MI.getOpcode()) { default: |