[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
Thu Aug 4 23:39:50 PDT 2022
Amir created this revision.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
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
@@ -649,24 +649,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.450241.patch
Type: text/x-patch
Size: 1465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220805/ddf3eea0/attachment.bin>
More information about the llvm-commits
mailing list