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. llvm-svn: 212130
This commit is contained in:
parent
4d1a26dcc2
commit
d8d510af92
|
@ -518,9 +518,7 @@ public:
|
||||||
return Queue.begin() + idx;
|
return Queue.begin() + idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
|
||||||
void dump();
|
void dump();
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Summarize the unscheduled region.
|
/// Summarize the unscheduled region.
|
||||||
|
|
|
@ -434,10 +434,8 @@ protected:
|
||||||
void bumpDownwardPressure(const MachineInstr *MI);
|
void bumpDownwardPressure(const MachineInstr *MI);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
|
||||||
void dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
|
void dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
|
||||||
const TargetRegisterInfo *TRI);
|
const TargetRegisterInfo *TRI);
|
||||||
#endif
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,11 +57,9 @@ struct ILPValue {
|
||||||
return RHS <= *this;
|
return RHS <= *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
|
||||||
void print(raw_ostream &OS) const;
|
void print(raw_ostream &OS) const;
|
||||||
|
|
||||||
void dump() const;
|
void dump() const;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Compute the values of each DAG node for various metrics during DFS.
|
/// \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
|
// unimplemented
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
LLVM_DUMP_METHOD
|
||||||
void ReadyQueue::dump() {
|
void ReadyQueue::dump() {
|
||||||
dbgs() << Name << ": ";
|
dbgs() << Name << ": ";
|
||||||
for (unsigned i = 0, e = Queue.size(); i < e; ++i)
|
for (unsigned i = 0, e = Queue.size(); i < e; ++i)
|
||||||
dbgs() << Queue[i]->NodeNum << " ";
|
dbgs() << Queue[i]->NodeNum << " ";
|
||||||
dbgs() << "\n";
|
dbgs() << "\n";
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// ScheduleDAGMI - Basic machine instruction scheduling. This is
|
// 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,
|
void llvm::dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
|
||||||
const TargetRegisterInfo *TRI) {
|
const TargetRegisterInfo *TRI) {
|
||||||
bool Empty = true;
|
bool Empty = true;
|
||||||
|
@ -55,6 +55,7 @@ void llvm::dumpRegSetPressure(ArrayRef<unsigned> SetPressure,
|
||||||
dbgs() << "\n";
|
dbgs() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVM_DUMP_METHOD
|
||||||
void RegisterPressure::dump(const TargetRegisterInfo *TRI) const {
|
void RegisterPressure::dump(const TargetRegisterInfo *TRI) const {
|
||||||
dbgs() << "Max Pressure: ";
|
dbgs() << "Max Pressure: ";
|
||||||
dumpRegSetPressure(MaxSetPressure, TRI);
|
dumpRegSetPressure(MaxSetPressure, TRI);
|
||||||
|
@ -68,6 +69,7 @@ void RegisterPressure::dump(const TargetRegisterInfo *TRI) const {
|
||||||
dbgs() << '\n';
|
dbgs() << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVM_DUMP_METHOD
|
||||||
void RegPressureTracker::dump() const {
|
void RegPressureTracker::dump() const {
|
||||||
if (!isTopClosed() || !isBottomClosed()) {
|
if (!isTopClosed() || !isBottomClosed()) {
|
||||||
dbgs() << "Curr Pressure: ";
|
dbgs() << "Curr Pressure: ";
|
||||||
|
@ -75,7 +77,6 @@ void RegPressureTracker::dump() const {
|
||||||
}
|
}
|
||||||
P.dump(TRI);
|
P.dump(TRI);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/// Increase the current pressure as impacted by these registers and bump
|
/// Increase the current pressure as impacted by these registers and bump
|
||||||
/// the high water mark if needed.
|
/// 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 {
|
void ILPValue::print(raw_ostream &OS) const {
|
||||||
OS << InstrCount << " / " << Length << " = ";
|
OS << InstrCount << " / " << Length << " = ";
|
||||||
if (!Length)
|
if (!Length)
|
||||||
|
@ -1517,16 +1517,17 @@ void ILPValue::print(raw_ostream &OS) const {
|
||||||
OS << format("%g", ((double)InstrCount / Length));
|
OS << format("%g", ((double)InstrCount / Length));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVM_DUMP_METHOD
|
||||||
void ILPValue::dump() const {
|
void ILPValue::dump() const {
|
||||||
dbgs() << *this << '\n';
|
dbgs() << *this << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
LLVM_DUMP_METHOD
|
||||||
raw_ostream &operator<<(raw_ostream &OS, const ILPValue &Val) {
|
raw_ostream &operator<<(raw_ostream &OS, const ILPValue &Val) {
|
||||||
Val.print(OS);
|
Val.print(OS);
|
||||||
return OS;
|
return OS;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace llvm
|
} // namespace llvm
|
||||||
#endif // !NDEBUG || LLVM_ENABLE_DUMP
|
|
||||||
|
|
Loading…
Reference in New Issue