[LLVMdev] GHC, aliases, and LLVM HEAD

Chandler Carruth chandlerc at google.com
Mon May 26 21:18:16 PDT 2014


On Mon, May 26, 2014 at 5:05 PM, Ben Gamari <bgamari.foss at gmail.com> wrote:

> Our C-- representation might refer to `f` without calling it (e.g. when
> building a thunk). In this case we don't have access to the function's
> signature, which we can only infer from a `call` node. For this reason,
> we currently demote all pointers to some common type (i8* currently) so
> we don't run into LLVM's type system in cases where we can't infer a
> value's type.
>

Couldn't you then conjure up an i8* global (or whatever other placeholder
you want) and when you discover that it is in fact a function, replace all
the uses with a bitcast from the actual function to an i8*?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140526/18faea88/attachment.html>


More information about the llvm-dev mailing list