[PATCH] D104013: [LangRef] State that the based-on relation is for pointer typed values only

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 13 19:21:20 PDT 2021


aqjune marked 4 inline comments as done.
aqjune added a comment.

Thank you very much for the comments!



================
Comment at: llvm/docs/LangRef.rst:2689
+   to assume that ``q`` is based on ``p`` because the value of ``i`` could have
+   been contributed by another pointer via conditional branches as well.
 -  The "*based* on" relationship is transitive.
----------------
nhaehnle wrote:
> hvdijk wrote:
> > This looks wrong, `q` is based on "all pointer values that contribute (directly or indirectly) to the computation of the pointer's value", and `p`'s value clearly contributes to that of `q`, so `q` is based on `p`. What I think you're trying to say here is that it is incorrect to assume that `q` is //only// based on `p`.
> I agree. I wonder if this bullet point couldn't be folded into the bullet "A pointer cast from an integer constant ..." above.
> 
> Is there a good reason for distinguishing between an inttoptr from constant vs. inttoptr from anything else? I'd naively assume they behave the same.
Thanks, I simply removed the `inttoptr` part, and moved the `inttoptr(ptrtoint)` warning below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104013



More information about the llvm-commits mailing list