search for: createspillstackobject

Displaying 12 results from an estimated 12 matches for "createspillstackobject".

2012 Dec 03
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...0 > 64 117 118 }). I don;t know which preg corresponds to RBP. > > You say that RBP should be saved/restored across the call. I tried to > generate that code, but, as I said in my previous mail, I don't know how > to get the appropriate TargetRegisterClass (needed to call > CreateSpillStackObject). Should I instead be generating code to save > register EBP at the start of scinstal, restoring it at the end of that > function? > > Susan > > > > ArrayRef<MCPhysReg> pregs = TRC->getRawAllocationOrder(&MF); > for (int i = 0; i < pregs.size(); ++i) {...
2012 Dec 03
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...> don;t know which preg corresponds to RBP. > > You say that RBP should be saved/restored across the call. I > tried to generate that code, but, as I said in my previous mail, > I don't know how to get the appropriate TargetRegisterClass > (needed to call CreateSpillStackObject). Should I instead be > generating code to save register EBP at the start of scinstal, > restoring it at the end of that function? > > Susan > > >> >> ArrayRef<MCPhysReg> pregs = TRC->getRawAllocationOrder(&MF); >> for (int i =...
2012 Dec 01
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...that virtual register includes EBP in that available-preg set. > This is a disaster, since writing into EBP clobbers RBP. > > I tried to add code to save all live physical registers across calls, but > I don't know how to get the appropriate TargetRegisterClass (needed to call > CreateSpillStackObject). > > Is there a different way to save/restore RBP across calls? Or a way to > get its TargetRegisterClass? > > Susan > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121130/faaa9e0c/attac...
2009 Sep 14
0
[LLVMdev] [PATCH] Spill Comments
...g spill slots. typo represnting. Why does SpillObjects need to be a DenseSet? It seems that it is created in order. I think it can just be a vector which is looked up with a binary search. Instead of making CreateStackObject take a "bool isSpill", how about adding a new "CreateSpillStackObject"? That seems much nicer in the code than having: CreateStackObject(16, 16, /*isSpill*/false); everywhere. The number of places that create spill slots is pretty small compared to the number of "/*isSpill*/false". What is the lib/Target/X86/X86RegisterInfo.cpp change doing?...
2009 Sep 11
7
[LLVMdev] [PATCH] Spill Comments
Attached is a patch to print asm comments for spill information. We've discussed the mechanisms before but I wanted to run the patch by everyone before I start to commit pieces. -Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: spillcomments.patch Type: text/x-diff Size: 58930 bytes Desc: not available URL:
2012 Nov 16
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
On Nov 15, 2012, at 8:04 PM, Lang Hames <lhames at gmail.com> wrote: > Jakob pointed out to me that the Gcra.cpp allocator doesn't record basic-block live-ins, which are used by the verifier to check correctness. > > You can record which variables are live into a basic block with MachineBasicBlock::addLiveIn(unsigned physReg). I don't know the verifier well, but if
2009 Sep 14
1
[LLVMdev] [PATCH] Spill Comments
...rder. I think it can just be a vector which is looked up > with a binary search. I wasn't sure ordering was guaranteed. As I noted to Dan, I'd like to get rid of this entirely. > Instead of making CreateStackObject take a "bool isSpill", how about > adding a new "CreateSpillStackObject"? That seems much nicer in the > code than having: CreateStackObject(16, 16, /*isSpill*/false); > everywhere. The number of places that create spill slots is pretty > small compared to the number of "/*isSpill*/false". Yep, much better. > What is the lib/Target/X86/X86...
2012 Nov 15
5
[LLVMdev] problem trying to write an LLVM register-allocation pass
I tried using this flag and it gave me errors on code that otherwise assembles and runs just fine (using the version of Gcra.cpp that Lang wrote). So I'm wondering if I should really be using the flag? I'm using it like this: llc -verify-machineinstrs -load Debug/lib/P4.so -regalloc=gc xxx.bc Susan On 11/15/2012 01:13 PM, Jakob Stoklund Olesen wrote: > > On Nov 15, 2012, at
2012 Nov 09
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...{ for (std::set<unsigned>::iterator it = vregSet.begin(); it != vregSet.end(); it++) { unsigned vreg = *it; // Allocate a new stack object for this vreg const TargetRegisterClass *RC = MRI->getRegClass(vreg); MachineFunction *MF = &Fn; int frameIndex = MF->getFrameInfo()->CreateSpillStackObject(RC->getSize(), RC->getAlignment()); // iterate over all basic blocks, all instructions in a block, // all operands in an instruction for (MachineFunction::iterator MFIt = Fn.begin(), MFendIt = Fn.end(); MFIt != MFendIt; MFIt++) { for (MachineBasicBlock::iterator MBBIt = MFIt...
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
...to be allocated to that virtual register includes EBP in that available-preg set. This is a disaster, since writing into EBP clobbers RBP. I tried to add code to save all live physical registers across calls, but I don't know how to get the appropriate TargetRegisterClass (needed to call CreateSpillStackObject). Is there a different way to save/restore RBP across calls? Or a way to get its TargetRegisterClass? Susan
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...ers; the aliases are { 50 64 117 118 }). I don;t know which preg corresponds to RBP. You say that RBP should be saved/restored across the call. I tried to generate that code, but, as I said in my previous mail, I don't know how to get the appropriate TargetRegisterClass (needed to call CreateSpillStackObject). Should I instead be generating code to save register EBP at the start of scinstal, restoring it at the end of that function? Susan > > ArrayRef<MCPhysReg> pregs = TRC->getRawAllocationOrder(&MF); > for (int i = 0; i < pregs.size(); ++i) { > if (MRI->isReserv...
2012 Nov 08
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
Hi Susan, In x86-64 the REX prefix must be used to access an extended register (r8-r15 and their aliases), but cannot be used when accessing the high byte of the ABCD regs (AH, BH, CH, DH). In your test case you have hardcoded %vreg1 to R8B, and %vreg15 to AH, and the test case contains a copy between these registers. The copy simultaneously must have a REX prefix, and cannot have a REX prefix,