Today the safepoint IR verifier catches some unrelocated uses of base pointers
that are actually valid.
With this change, we narrow down the set of false positives. Specifically, the
verifier knows about compares to null and compares between 2 unrelocated
pointers.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/IR/SafepointIRVerifier.cpp | ||
---|---|---|
230 ↗ | (On Diff #105429) | Don't you want to re-write this utility function without recursion? |
390 ↗ | (On Diff #105429) | if both parts are true it means both are relocated pointers, why do we return false? Did I miss anything? |
lib/IR/SafepointIRVerifier.cpp | ||
---|---|---|
230 ↗ | (On Diff #105429) | Yeah, that might be better. I'll check it in as NFC, along with the BaseType enum return. We'll still need the visited parameter to avoid traversing through the operands again in the worklist. |
390 ↗ | (On Diff #105429) | The reason is because we are interested only in valid *unrelocated* uses. This happens only when both operands are unrelocated: these operands are either null, constant pointers or non-constant pointers (please see the comment above: lines 383). |
Need to rebase code over the NFC refactoring.
lib/IR/SafepointIRVerifier.cpp | ||
---|---|---|
230 ↗ | (On Diff #105429) | Checked in NFC refactoring change: https://reviews.llvm.org/rL307340 |
lib/IR/SafepointIRVerifier.cpp | ||
---|---|---|
390 ↗ | (On Diff #105429) | Got it. It is not a bool algebra :) !hasValidUnrelocatedUse does not mean has invalid :) it means has not or has invalid. |