diff options
| author | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-14 12:53:11 +0000 |
|---|---|---|
| committer | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-14 12:53:11 +0000 |
| commit | d34e60ca8532511acb8c93ef26297e349fbec86a (patch) | |
| tree | 1a095bc8694498d94232e81b95c1da05d462d3ec /llvm/lib/Target/BPF/BPFMIPeephole.cpp | |
| parent | affbc99bea94e77f7ebccd8ba887e33051bd04ee (diff) | |
| download | bcm5719-llvm-d34e60ca8532511acb8c93ef26297e349fbec86a.tar.gz bcm5719-llvm-d34e60ca8532511acb8c93ef26297e349fbec86a.zip | |
Rename DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
- Manual change to APInt
- Manually chage DOCS as regex doesn't match it.
In the transition period the DEBUG() macro is still present and aliased
to the LLVM_DEBUG() one.
Differential Revision: https://reviews.llvm.org/D43624
llvm-svn: 332240
Diffstat (limited to 'llvm/lib/Target/BPF/BPFMIPeephole.cpp')
| -rw-r--r-- | llvm/lib/Target/BPF/BPFMIPeephole.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/llvm/lib/Target/BPF/BPFMIPeephole.cpp b/llvm/lib/Target/BPF/BPFMIPeephole.cpp index 09cc6b31ad8..9e984d0facf 100644 --- a/llvm/lib/Target/BPF/BPFMIPeephole.cpp +++ b/llvm/lib/Target/BPF/BPFMIPeephole.cpp @@ -72,15 +72,15 @@ void BPFMIPeephole::initialize(MachineFunction &MFParm) { MF = &MFParm; MRI = &MF->getRegInfo(); TII = MF->getSubtarget<BPFSubtarget>().getInstrInfo(); - DEBUG(dbgs() << "*** BPF MachineSSA peephole pass ***\n\n"); + LLVM_DEBUG(dbgs() << "*** BPF MachineSSA peephole pass ***\n\n"); } bool BPFMIPeephole::isMovFrom32Def(MachineInstr *MovMI) { MachineInstr *DefInsn = MRI->getVRegDef(MovMI->getOperand(1).getReg()); - DEBUG(dbgs() << " Def of Mov Src:"); - DEBUG(DefInsn->dump()); + LLVM_DEBUG(dbgs() << " Def of Mov Src:"); + LLVM_DEBUG(DefInsn->dump()); if (!DefInsn) return false; @@ -111,7 +111,7 @@ bool BPFMIPeephole::isMovFrom32Def(MachineInstr *MovMI) return false; } - DEBUG(dbgs() << " One ZExt elim sequence identified.\n"); + LLVM_DEBUG(dbgs() << " One ZExt elim sequence identified.\n"); return true; } @@ -139,8 +139,8 @@ bool BPFMIPeephole::eliminateZExtSeq(void) { unsigned ShfReg = MI.getOperand(1).getReg(); MachineInstr *SllMI = MRI->getVRegDef(ShfReg); - DEBUG(dbgs() << "Starting SRL found:"); - DEBUG(MI.dump()); + LLVM_DEBUG(dbgs() << "Starting SRL found:"); + LLVM_DEBUG(MI.dump()); if (!SllMI || SllMI->isPHI() || @@ -148,8 +148,8 @@ bool BPFMIPeephole::eliminateZExtSeq(void) { SllMI->getOperand(2).getImm() != 32) continue; - DEBUG(dbgs() << " SLL found:"); - DEBUG(SllMI->dump()); + LLVM_DEBUG(dbgs() << " SLL found:"); + LLVM_DEBUG(SllMI->dump()); MachineInstr *MovMI = MRI->getVRegDef(SllMI->getOperand(1).getReg()); if (!MovMI || @@ -157,12 +157,13 @@ bool BPFMIPeephole::eliminateZExtSeq(void) { MovMI->getOpcode() != BPF::MOV_32_64) continue; - DEBUG(dbgs() << " Type cast Mov found:"); - DEBUG(MovMI->dump()); + LLVM_DEBUG(dbgs() << " Type cast Mov found:"); + LLVM_DEBUG(MovMI->dump()); unsigned SubReg = MovMI->getOperand(1).getReg(); if (!isMovFrom32Def(MovMI)) { - DEBUG(dbgs() << " One ZExt elim sequence failed qualifying elim.\n"); + LLVM_DEBUG(dbgs() + << " One ZExt elim sequence failed qualifying elim.\n"); continue; } @@ -228,7 +229,7 @@ public: void BPFMIPreEmitPeephole::initialize(MachineFunction &MFParm) { MF = &MFParm; TRI = MF->getSubtarget<BPFSubtarget>().getRegisterInfo(); - DEBUG(dbgs() << "*** BPF PreEmit peephole pass ***\n\n"); + LLVM_DEBUG(dbgs() << "*** BPF PreEmit peephole pass ***\n\n"); } bool BPFMIPreEmitPeephole::eliminateRedundantMov(void) { @@ -239,8 +240,8 @@ bool BPFMIPreEmitPeephole::eliminateRedundantMov(void) { for (MachineInstr &MI : MBB) { // If the previous instruction was marked for elimination, remove it now. if (ToErase) { - DEBUG(dbgs() << " Redundant Mov Eliminated:"); - DEBUG(ToErase->dump()); + LLVM_DEBUG(dbgs() << " Redundant Mov Eliminated:"); + LLVM_DEBUG(ToErase->dump()); ToErase->eraseFromParent(); ToErase = nullptr; } |

