diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp index 8aa57ba7293..08e5858a08d 100644 --- a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp +++ b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp @@ -103,6 +103,7 @@ public: explicit PrintState(int State) : State(State) {} }; +#ifndef NDEBUG static raw_ostream &operator<<(raw_ostream &OS, const PrintState &PS) { if (PS.State & StateWQM) OS << "WQM"; @@ -119,6 +120,7 @@ static raw_ostream &operator<<(raw_ostream &OS, const PrintState &PS) { return OS; } +#endif struct InstrInfo { char Needs = 0; @@ -219,7 +221,8 @@ FunctionPass *llvm::createSIWholeQuadModePass() { return new SIWholeQuadMode; } -void SIWholeQuadMode::printInfo() { +#ifndef NDEBUG +LLVM_DEBUG_METHOD void SIWholeQuadMode::printInfo() { for (const auto &BII : Blocks) { dbgs() << "\nBB#" << BII.first->getNumber() << ":\n" << " InNeeds = " << PrintState(BII.second.InNeeds) @@ -236,6 +239,7 @@ void SIWholeQuadMode::printInfo() { } } } +#endif void SIWholeQuadMode::markInstruction(MachineInstr &MI, char Flag, std::vector<WorkItem> &Worklist) { diff --git a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp index 1f4304f710e..2235927d986 100644 --- a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp +++ b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp @@ -548,13 +548,14 @@ static unsigned ReplaceCounter = 0; char HCE::ID = 0; +#ifndef NDEBUG LLVM_DUMP_METHOD void RangeTree::dump() const { dbgs() << "Root: " << Root << '\n'; if (Root) dump(Root); } -void RangeTree::dump(const Node *N) const { +LLVM_DUMP_METHOD void RangeTree::dump(const Node *N) const { dbgs() << "Node: " << N << '\n'; dbgs() << " Height: " << N->Height << '\n'; dbgs() << " Count: " << N->Count << '\n'; @@ -568,6 +569,7 @@ void RangeTree::dump(const Node *N) const { if (N->Right) dump(N->Right); } +#endif void RangeTree::order(Node *N, SmallVectorImpl<Node*> &Seq) const { if (N == nullptr) |