[PATCH] D149129: [CodeGen] fix ungated debug call
Ezra Shaw via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 23:50:44 PDT 2023
Ezrashaw created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Ezrashaw requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
put some debug calls in a `LLVM_DEBUG` invocation
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149129
Files:
llvm/lib/CodeGen/PrologEpilogInserter.cpp
Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
===================================================================
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -313,15 +313,15 @@
static_cast<float>(SpillSize) / static_cast<float>(StackSize);
float VarPct = 1.0f - SpillPct;
int64_t VariableSize = StackSize - SpillSize;
- dbgs() << formatv("{0}/{1} ({3:P}) spills, {2}/{1} ({4:P}) variables",
- SpillSize, StackSize, VariableSize, SpillPct, VarPct);
+ LLVM_DEBUG(dbgs() << formatv("{0}/{1} ({3:P}) spills, {2}/{1} ({4:P}) variables",
+ SpillSize, StackSize, VariableSize, SpillPct, VarPct));
if (UnsafeStackSize != 0) {
float UnsafePct =
static_cast<float>(UnsafeStackSize) / static_cast<float>(StackSize);
- dbgs() << formatv(", {0}/{2} ({1:P}) unsafe stack", UnsafeStackSize,
- UnsafePct, StackSize);
+ LLVM_DEBUG(dbgs() << formatv(", {0}/{2} ({1:P}) unsafe stack", UnsafeStackSize,
+ UnsafePct, StackSize));
}
- dbgs() << "\n";
+ LLVM_DEBUG(dbgs() << "\n");
}
ORE->emit([&]() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149129.516638.patch
Type: text/x-patch
Size: 1198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230425/7f7d24d8/attachment.bin>
More information about the llvm-commits
mailing list