[PATCH] D132495: [BOLT] Verify externally referenced blocks against jump table targets
Maksim Panchenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 11:05:47 PDT 2022
maksfb added inline comments.
================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1875
+ // points.
+ if (!opts::StrictMode && hasInternalReference()) {
+ SmallPtrSet<MCSymbol *, 4> JTTargets;
----------------
Let's refactor the code into a function since it's quite large.
================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1880
+
+ bool UnclaimedReference = false;
+ for (uint64_t Destination : ExternallyReferencedOffsets) {
----------------
================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1895
+ if (opts::Verbosity >= 1) {
+ outs() << "BOLT-WARNING: unclaimed data to code reference (possibly "
+ << "an unrecognized jump table entry) to " << BB->getName()
----------------
================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1897
+ << "an unrecognized jump table entry) to " << BB->getName()
+ << " in " << *this << ".\n";
+ }
----------------
================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1903
+ if (opts::Verbosity >= 1) {
+ outs() << "BOLT-WARNING: unknown data to code reference to offset "
+ << Twine::utohexstr(Destination) << " in " << *this << ".\n";
----------------
================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1904
+ outs() << "BOLT-WARNING: unknown data to code reference to offset "
+ << Twine::utohexstr(Destination) << " in " << *this << ".\n";
+ }
----------------
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