mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Move remaining LLVM_ENABLE_DUMP conditionals out of the headers
This macro is sometimes defined manually but isn't (and doesn't need to be) in llvm-config.h so shouldn't appear in the headers, likewise NDEBUG. Instead switch them over to LLVM_DUMP_METHOD on the definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212130 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
49ec6e933f
commit
a96332b9c7
@ -518,9 +518,7 @@ public:
|
||||
return Queue.begin() + idx;
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
void dump();
|
||||
#endif
|
||||
};
|
||||
|
||||
/// Summarize the unscheduled region.
|
||||
|
@ -434,10 +434,8 @@ protected:
|
||||
void bumpDownwardPressure(const MachineInstr *MI);
|
||||
};
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
void dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
|
||||
const TargetRegisterInfo *TRI);
|
||||
#endif
|
||||
} // end namespace llvm
|
||||
|
||||
#endif
|
||||
|
@ -57,11 +57,9 @@ struct ILPValue {
|
||||
return RHS <= *this;
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
void print(raw_ostream &OS) const;
|
||||
|
||||
void dump() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
/// \brief Compute the values of each DAG node for various metrics during DFS.
|
||||
|
@ -478,14 +478,13 @@ void MachineSchedulerBase::print(raw_ostream &O, const Module* m) const {
|
||||
// unimplemented
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD
|
||||
void ReadyQueue::dump() {
|
||||
dbgs() << Name << ": ";
|
||||
for (unsigned i = 0, e = Queue.size(); i < e; ++i)
|
||||
dbgs() << Queue[i]->NodeNum << " ";
|
||||
dbgs() << "\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ScheduleDAGMI - Basic machine instruction scheduling. This is
|
||||
|
@ -41,7 +41,7 @@ static void decreaseSetPressure(std::vector<unsigned> &CurrSetPressure,
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD
|
||||
void llvm::dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
|
||||
const TargetRegisterInfo *TRI) {
|
||||
bool Empty = true;
|
||||
@ -55,6 +55,7 @@ void llvm::dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
|
||||
dbgs() << "\n";
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD
|
||||
void RegisterPressure::dump(const TargetRegisterInfo *TRI) const {
|
||||
dbgs() << "Max Pressure: ";
|
||||
dumpRegSetPressure(MaxSetPressure, TRI);
|
||||
@ -68,6 +69,7 @@ void RegisterPressure::dump(const TargetRegisterInfo *TRI) const {
|
||||
dbgs() << '\n';
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD
|
||||
void RegPressureTracker::dump() const {
|
||||
if (!isTopClosed() || !isBottomClosed()) {
|
||||
dbgs() << "Curr Pressure: ";
|
||||
@ -75,7 +77,6 @@ void RegPressureTracker::dump() const {
|
||||
}
|
||||
P.dump(TRI);
|
||||
}
|
||||
#endif
|
||||
|
||||
/// Increase the current pressure as impacted by these registers and bump
|
||||
/// the high water mark if needed.
|
||||
|
@ -1508,7 +1508,7 @@ void SchedDFSResult::scheduleTree(unsigned SubtreeID) {
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD
|
||||
void ILPValue::print(raw_ostream &OS) const {
|
||||
OS << InstrCount << " / " << Length << " = ";
|
||||
if (!Length)
|
||||
@ -1517,16 +1517,17 @@ void ILPValue::print(raw_ostream &OS) const {
|
||||
OS << format("%g", ((double)InstrCount / Length));
|
||||
}
|
||||
|
||||
LLVM_DUMP_METHOD
|
||||
void ILPValue::dump() const {
|
||||
dbgs() << *this << '\n';
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
|
||||
LLVM_DUMP_METHOD
|
||||
raw_ostream &operator<<(raw_ostream &OS, const ILPValue &Val) {
|
||||
Val.print(OS);
|
||||
return OS;
|
||||
}
|
||||
|
||||
} // namespace llvm
|
||||
#endif // !NDEBUG || LLVM_ENABLE_DUMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user