[PATCH] D131243: [BOLT][NFC] Simplify debug logging in case of JT heuristic failure
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 17:35:28 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG055f9f6d0869: [BOLT][NFC] Simplify debug logging in case of JT heuristic failure (authored by Amir).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131243/new/
https://reviews.llvm.org/D131243
Files:
bolt/lib/Core/BinaryContext.cpp
Index: bolt/lib/Core/BinaryContext.cpp
===================================================================
--- bolt/lib/Core/BinaryContext.cpp
+++ bolt/lib/Core/BinaryContext.cpp
@@ -646,24 +646,14 @@
analyzeJumpTable(JT->getAddress(), JT->Type, *(JT->Parents[0]),
NextJTAddress, &JT->EntriesAsAddress);
if (!Success) {
- LLVM_DEBUG(ListSeparator LS;
- dbgs() << "failed to analyze jump table in function ";
- for (BinaryFunction *Frag
- : JT->Parents) dbgs()
- << LS << *Frag;
- dbgs() << '\n';);
- JT->print(dbgs());
- if (NextJTI != JTE) {
- LLVM_DEBUG(ListSeparator LS;
- dbgs() << "next jump table at 0x"
- << Twine::utohexstr(NextJTI->second->getAddress())
- << " belongs to function ";
- for (BinaryFunction *Frag
- : NextJTI->second->Parents) dbgs()
- << LS << *Frag;
- dbgs() << "\n";);
- NextJTI->second->print(dbgs());
- }
+ LLVM_DEBUG({
+ dbgs() << "failed to analyze ";
+ JT->print(dbgs());
+ if (NextJTI != JTE) {
+ dbgs() << "next ";
+ NextJTI->second->print(dbgs());
+ }
+ });
llvm_unreachable("jump table heuristic failure");
}
for (BinaryFunction *Frag : JT->Parents) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131243.453484.patch
Type: text/x-patch
Size: 1465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220818/5d5d14bd/attachment.bin>
More information about the llvm-commits
mailing list