[LLVMdev] Going from argument to register and back
Chris Lattner
clattner at apple.com
Mon Sep 29 14:20:00 PDT 2008
On Sep 29, 2008, at 9:10 AM, Villmow, Micah wrote:
> One of the requirements for the backend that I am targeting is
> certain meta-data needs to be returned to the runtime. This includes
> the mapping between parameters and the locations this data is
> expected to be stored at. This is mainly because there are multiple
> address spaces and each one is mapped differently but all are
> assigned registers from the same register class. So this mapping
> needs to be known at compile time and passed in the generated code
> to the runtime to be processed before execution.
The typical solution to this is to have a one "load" instruction for
each address space. The load for address space #17 knows that it is
for that addr space. Instruction selection handles its generation,
and the asmprinter hook can print whatever metadata you want.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080929/3486cec4/attachment.html>
More information about the llvm-dev
mailing list