[PATCH] D132495: [BOLT] Verify externally referenced blocks against jump table targets

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 15:04:46 PDT 2022


rafauler added inline comments.


================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1848
+  // flow and register externally referenced blocks as entry points.
+  if (hasInternalReference() && JumpTables.empty()) {
+    HasUnknownControlFlow = true;
----------------
What happens if we do have JumpTables and yet we have internal references that do not appear in any jump table?


================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1849
+  if (hasInternalReference() && JumpTables.empty()) {
+    HasUnknownControlFlow = true;
+    for (uint64_t PossibleDestination : ExternallyReferencedOffsets)
----------------
>From reading this code I got the impression that UnknownControlFlow is only used in strict mode?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132495/new/

https://reviews.llvm.org/D132495



More information about the llvm-commits mailing list