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/SystemZ/SystemZHazardRecognizer.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/SystemZ/SystemZHazardRecognizer.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp index a643b056528..9e8acdaabd9 100644 --- a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp +++ b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp @@ -85,7 +85,7 @@ void SystemZHazardRecognizer::Reset() { GrpCount = 0; LastFPdOpCycleIdx = UINT_MAX; LastEmittedMI = nullptr; - DEBUG(CurGroupDbg = "";); + LLVM_DEBUG(CurGroupDbg = "";); } bool @@ -112,8 +112,8 @@ void SystemZHazardRecognizer::nextGroup() { if (CurrGroupSize == 0) return; - DEBUG(dumpCurrGroup("Completed decode group")); - DEBUG(CurGroupDbg = "";); + LLVM_DEBUG(dumpCurrGroup("Completed decode group")); + LLVM_DEBUG(CurGroupDbg = "";); GrpCount++; @@ -131,7 +131,7 @@ void SystemZHazardRecognizer::nextGroup() { ProcResCostLim)) CriticalResourceIdx = UINT_MAX; - DEBUG(dumpState();); + LLVM_DEBUG(dumpState();); } #ifndef NDEBUG // Debug output @@ -234,25 +234,23 @@ static inline bool isBranchRetTrap(MachineInstr *MI) { void SystemZHazardRecognizer:: EmitInstruction(SUnit *SU) { const MCSchedClassDesc *SC = getSchedClass(SU); - DEBUG(dbgs() << "++ HazardRecognizer emitting "; dumpSU(SU, dbgs()); - dbgs() << "\n";); - DEBUG(dumpCurrGroup("Decode group before emission");); + LLVM_DEBUG(dbgs() << "++ HazardRecognizer emitting "; dumpSU(SU, dbgs()); + dbgs() << "\n";); + LLVM_DEBUG(dumpCurrGroup("Decode group before emission");); // If scheduling an SU that must begin a new decoder group, move on // to next group. if (!fitsIntoCurrentGroup(SU)) nextGroup(); - DEBUG(raw_string_ostream cgd(CurGroupDbg); - if (CurGroupDbg.length()) - cgd << ", "; - dumpSU(SU, cgd);); + LLVM_DEBUG(raw_string_ostream cgd(CurGroupDbg); + if (CurGroupDbg.length()) cgd << ", "; dumpSU(SU, cgd);); LastEmittedMI = SU->getInstr(); // After returning from a call, we don't know much about the state. if (SU->isCall) { - DEBUG(dbgs() << "++ Clearing state after call.\n";); + LLVM_DEBUG(dbgs() << "++ Clearing state after call.\n";); Reset(); LastEmittedMI = SU->getInstr(); return; @@ -274,9 +272,10 @@ EmitInstruction(SUnit *SU) { (PI->ProcResourceIdx != CriticalResourceIdx && CurrCounter > ProcResourceCounters[CriticalResourceIdx]))) { - DEBUG(dbgs() << "++ New critical resource: " - << SchedModel->getProcResource(PI->ProcResourceIdx)->Name - << "\n";); + LLVM_DEBUG( + dbgs() << "++ New critical resource: " + << SchedModel->getProcResource(PI->ProcResourceIdx)->Name + << "\n";); CriticalResourceIdx = PI->ProcResourceIdx; } } @@ -284,8 +283,8 @@ EmitInstruction(SUnit *SU) { // Make note of an instruction that uses a blocking resource (FPd). if (SU->isUnbuffered) { LastFPdOpCycleIdx = getCurrCycleIdx(SU); - DEBUG(dbgs() << "++ Last FPd cycle index: " - << LastFPdOpCycleIdx << "\n";); + LLVM_DEBUG(dbgs() << "++ Last FPd cycle index: " << LastFPdOpCycleIdx + << "\n";); } // Insert SU into current group by increasing number of slots used @@ -409,7 +408,7 @@ void SystemZHazardRecognizer:: copyState(SystemZHazardRecognizer *Incoming) { // Current decoder group CurrGroupSize = Incoming->CurrGroupSize; - DEBUG(CurGroupDbg = Incoming->CurGroupDbg;); + LLVM_DEBUG(CurGroupDbg = Incoming->CurGroupDbg;); // Processor resources ProcResourceCounters = Incoming->ProcResourceCounters; |