[llvm-commits] [PATCH] Add an MF pointer argument to TRI::getPointerRegClass and TII::getRegClass

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon May 7 11:12:33 PDT 2012


On May 6, 2012, at 11:38 AM, Yiannis Tsiouris <gtsiour at softlab.ntua.gr> wrote:

> On 05/06/2012 09:19 PM, Yiannis Tsiouris wrote:
>> Hi,
>> 
>> The attached patch extends TRI::getPointerRegClass and TII::getRegClass
>> functions with an extra MF pointer argument in order to co-relate a
>> specific register class, e.g. GR32_TC, with a calling convention. This
>> is needed for the HiPE calling convention patch (discussed in [1]).
>> 
>> Please review!
>> 
>> Best,
>> Yiannis
>> 
>> [1]:
>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120430/142039.html
> 
> Resending with fixes in whitespace, please ignore previous attachment!

You have some 80-col violations. Otherwise it looks good.

$ egrep '^\+ .{80}' getPointerRegClass-getRegClass-add-MF-arg.diff 
+        if (const TargetRegisterClass *DRC = TII->getRegClass(MCID,MONum,TRI,*MF)) {
+        if (const TargetRegisterClass *DRC = TII->getRegClass(MCID,MONum,TRI,*MF)) {
+      DstRC = TRI->getAllocatableClass(TII->getRegClass(*II, IIOpNum, TRI, *MF));
+                                                                          const {
+  unsigned TmpReg = MRI->createVirtualRegister(TII->getRegClass(MCID1,0,TRI,MF));

/jakob




More information about the llvm-commits mailing list