Allow IntToPtrInst to carry !dereferenceable metadata tag.
This is valid since !dereferenceable can be only be applied to
pointer type values.
Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4
Paths
| Differential D64954
[IR][Verifier] Allow IntToPtrInst to be !dereferenceable ClosedPublic Authored by rtaylor on Jul 18 2019, 3:38 PM.
Details Summary Allow IntToPtrInst to carry !dereferenceable metadata tag. Change-Id: If8a6e3c616f073d51eaff52ab74535c29ed497b4
Diff Detail
Event Timeline
rtaylor marked an inline comment as done. Comment ActionsFixed test to use llvm-as and to just check for passing. Comment Actions Are you planning to teach Value::getPointerDereferenceableBytes about this? The rest of the pipeline "should" then "just work" and use the information.
Comment Actions Changed LangRef.rst to reflect !dereferenceable is applicable to pointer types not Changed logic in verifier. This revision is now accepted and ready to land.Jul 21 2019, 11:14 AM Comment Actions Thanks! Could you please also add a test to Analysis/ValueTracking/memory-dereferenceable.ll?
rtaylor added inline comments.
Comment Actions Changed LangRef.rst: Moved !dereferenceable and !dereferenceable_or_null to their Added test for Analysis/ValueTracking.
Comment Actions LGTM, though I believe the hyperlinks in :ref: need to be without the underscore (and other examples of :ref: use seem to corroborate that). Closed by commit rL366826: [IR][Verifier] Allow IntToPtrInst to be !dereferenceable (authored by rtayl). · Explain WhyJul 23 2019, 10:20 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 211122 docs/LangRef.rst
lib/IR/Value.cpp
lib/IR/Verifier.cpp
test/Analysis/ValueTracking/memory-dereferenceable.ll
test/Verifier/dereferenceable-md-inttoptr.ll
test/Verifier/dereferenceable-md.ll
|
Could you add the incantations for hyperlinks? ".. _blahblah" for the anchor and :ref:.... <blahblah> for the link.