[LLVMdev] How to Allocate a Variable to a Specific register
qcolombet at apple.com
Fri Mar 13 11:02:00 PDT 2015
Could you give more details on what you are trying to achieve?
> On Mar 12, 2015, at 11:52 PM, Avinash Bole <boleavinash at gmail.com> wrote:
> 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?
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev