[LLVMdev] How to Allocate a Variable to a Specific register
Avinash Bole
boleavinash at gmail.com
Thu Mar 12 23:52:28 PDT 2015
Hi,
Im trying to allocate registers for given code..,and my requirement is to
allocate a specific register to a given variable( ex: int a ; // I want to
allocate register R1 to a).
I think one way to do this is by writing an llvm pass as described here
<http://llvm.org/docs/WritingAnLLVMPass.html#the-machinefunctionpass-class>.
But im not sure it will work..,Another way i thought of is to change
Allocation order in "AltOrder" in "xxxRegisterInfo.td". This worked for 1
variable..,but if i have two or more variables and more registers.,i cant
get the exact register i want for the exact variable.
Please suggest me a way to do this.
Also..,Is there a way to check contents of each "bit" in a register?
Thanks,
Avinash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150313/9be48300/attachment.html>
More information about the llvm-dev
mailing list