diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-12-17 03:56:00 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-12-17 03:56:00 +0000 |
commit | 588ceec0f761f303e05c09761f956f848094e1c8 (patch) | |
tree | d8fa14d0a2ee71d52722b99774d0a7c22d5614e5 /llvm/lib/CodeGen/PeepholeOptimizer.cpp | |
parent | 555d1aa3a4b2e7e853b6e5c98cbeb6bf4295720b (diff) | |
download | bcm5719-llvm-588ceec0f761f303e05c09761f956f848094e1c8.tar.gz bcm5719-llvm-588ceec0f761f303e05c09761f956f848094e1c8.zip |
Add debug prints for when optimizeLoadInstr folds a load.
llvm-svn: 170298
Diffstat (limited to 'llvm/lib/CodeGen/PeepholeOptimizer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PeepholeOptimizer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PeepholeOptimizer.cpp b/llvm/lib/CodeGen/PeepholeOptimizer.cpp index 0900ba31342..a7439b5129b 100644 --- a/llvm/lib/CodeGen/PeepholeOptimizer.cpp +++ b/llvm/lib/CodeGen/PeepholeOptimizer.cpp @@ -66,6 +66,7 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetRegisterInfo.h" using namespace llvm; @@ -478,6 +479,9 @@ bool PeepholeOptimizer::foldImmediate(MachineInstr *MI, MachineBasicBlock *MBB, } bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) { + DEBUG(dbgs() << "********** PEEPHOLE OPTIMIZER **********\n"); + DEBUG(dbgs() << "********** Function: " << MF.getName() << '\n'); + if (DisablePeephole) return false; @@ -552,6 +556,8 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) { FoldAsLoadDefReg, DefMI); if (FoldMI) { // Update LocalMIs since we replaced MI with FoldMI and deleted DefMI. + DEBUG(dbgs() << "Replacing: " << *MI); + DEBUG(dbgs() << " With: " << *FoldMI); LocalMIs.erase(MI); LocalMIs.erase(DefMI); LocalMIs.insert(FoldMI); |