aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorDon Hinton <hintonda@gmail.com>2017-10-12 16:16:06 +0000
committerDon Hinton <hintonda@gmail.com>2017-10-12 16:16:06 +0000
commit3e0199f7ebab06654168e72add49b7f8eed75b27 (patch)
treec50690f9c8f9ff646b035e30b5840f36c5b169eb /llvm/lib/CodeGen/MachineScheduler.cpp
parent3a72909b7ed7ba81fab3e7a0ed3bfb98ee070418 (diff)
downloadllvm-3e0199f7ebab06654168e72add49b7f8eed75b27.zip
llvm-3e0199f7ebab06654168e72add49b7f8eed75b27.tar.gz
llvm-3e0199f7ebab06654168e72add49b7f8eed75b27.tar.bz2
[dump] Remove NDEBUG from test to enable dump methods [NFC]
Summary: Add LLVM_FORCE_ENABLE_DUMP cmake option, and use it along with LLVM_ENABLE_ASSERTIONS to set LLVM_ENABLE_DUMP. Remove NDEBUG and only use LLVM_ENABLE_DUMP to enable dump methods. Move definition of LLVM_ENABLE_DUMP from config.h to llvm-config.h so it'll be picked up by public headers. Differential Revision: https://reviews.llvm.org/D38406 llvm-svn: 315590
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 674e83c..73eea42 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -581,7 +581,7 @@ void MachineSchedulerBase::print(raw_ostream &O, const Module* m) const {
// unimplemented
}
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+#ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ReadyQueue::dump() const {
dbgs() << "Queue " << Name << ": ";
for (const SUnit *SU : Queue)
@@ -919,7 +919,7 @@ void ScheduleDAGMI::placeDebugValues() {
FirstDbgValue = nullptr;
}
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+#ifdef LLVM_ENABLE_DUMP
LLVM_DUMP_METHOD void ScheduleDAGMI::dumpSchedule() const {
for (MachineBasicBlock::iterator MI = begin(), ME = end(); MI != ME; ++MI) {
if (SUnit *SU = getSUnit(&(*MI)))
@@ -2354,7 +2354,7 @@ SUnit *SchedBoundary::pickOnlyChoice() {
return nullptr;
}
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+#ifdef LLVM_ENABLE_DUMP
// This is useful information to dump after bumpNode.
// Note that the Queue contents are more useful before pickNodeFromQueue.
LLVM_DUMP_METHOD void SchedBoundary::dumpScheduledState() const {
@@ -2698,7 +2698,7 @@ void GenericScheduler::initPolicy(MachineBasicBlock::iterator Begin,
void GenericScheduler::dumpPolicy() const {
// Cannot completely remove virtual function even in release mode.
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+#ifdef LLVM_ENABLE_DUMP
dbgs() << "GenericScheduler RegionPolicy: "
<< " ShouldTrackPressure=" << RegionPolicy.ShouldTrackPressure
<< " OnlyTopDown=" << RegionPolicy.OnlyTopDown