[LLVMdev] Bind a LLVM variable to a CPU register
John Criswell
criswell at illinois.edu
Thu Jul 19 11:28:35 PDT 2012
On 7/19/12 1:23 PM, Jim Grosbach wrote:
> Not really, no.
If you really, really, wanted to do it, you could:
1) Hack the code generator to not use that register. It might be as
simple as modifying the TableGen file to not know that the register exists.
2) Use inline asm to put the constant into that register and fetch it
from that register.
The real question is: what larger goal are you trying to accomplish?
Holding a constant value in a register might not be the best way to do
what you're doing.
-- John T.
>
> On Jul 19, 2012, at 11:14 AM, Xin Tong <xerox.time.tech at gmail.com> wrote:
>
>> I have a constant parameter in a LLVM function. Is there a way to
>> reserve a CPU register such that it also holds the value of the
>> parameter in LLVM x86 codegen ?
>>
>> Thanks
>>
>> Xin
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list