<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>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). <br><br></div>I think one way to do this is by writing an llvm pass as described <a href="http://llvm.org/docs/WritingAnLLVMPass.html#the-machinefunctionpass-class">here</a>. 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. <br><br></div>Please suggest me a way to do this.<br></div><div>Also..,Is there a way to check contents of each "bit" in a register?<br></div><div><br></div>Thanks,<br></div>Avinash<br></div>