[LLVMdev] Canonicalization of ptrtoint/inttoptr and getelementptr

Kevin Modzelewski kmod at dropbox.com
Wed Sep 10 14:55:46 PDT 2014


On Tue, Sep 9, 2014 at 9:27 PM, Philip Reames <listmail at philipreames.com>
wrote:

>
> I'm guessing the key difference in our reasoning is about the constant 5.
> :)  I'm also guessing that you have an example in mind which motivates the
> need for 5 to be considered associated with the address range.  Could you
> expand on why?
>
>
Can't speak for Dan, but in Pyston we certainly make use of these types of
constructs to embed JIT-time constants (say, an interned string, or a
reference to the current function object) into the function being compiled.
 Heuristically, we can all see the different of intent between "ptr + 5"
and "load (int*)0x2aaaaa0000", but it seems like it'd be difficult to come
up with reasonable rules that would separate them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140910/6c249558/attachment.html>


More information about the llvm-dev mailing list