For functions with references to internal offsets from data, verify externally
referenced blocks against the set of jump table targets. Mark the function
as non-simple if there are any unclaimed data to code references.
Details
- Reviewers
rafauler maksfb - Group Reviewers
Restricted Project - Commits
- rGe002523b65b8: [BOLT] Verify externally referenced blocks against jump table targets
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Add runtime test checking if the moved code with external data references to it
works correctly. If there's a reference to offset which is not a registered BB
or label, ignore the function.
bolt/include/bolt/Core/BinaryFunction.h | ||
---|---|---|
2122 | It's reasonable to expect for validate...() function to return true if all checks pass. Please invert the return code. | |
bolt/lib/Core/BinaryFunction.cpp | ||
1766 | Is there a reason to keep Found in a variable? | |
1778 | If you don't expect this warning to be firing frequently, let's print it at default verbosity level. |
LGTM, but please rename the method before the commit.
bolt/lib/Core/BinaryFunction.cpp | ||
---|---|---|
1911–1912 | There's an apparent confusion with "internal" vs "external" reference in this context. Let's rename the method to validateExternallyReferencedOffsets() or validateReferencedOffsets() to avoid it. |
It's reasonable to expect for validate...() function to return true if all checks pass. Please invert the return code.