search for: lre_willshrinkvirtreg

Displaying 4 results from an estimated 4 matches for "lre_willshrinkvirtreg".

2011 Nov 29
0
[LLVMdev] Register allocation in two passes
...n't work with the fast register allocator. You will need some custom code in RAGreedy since the current target APIs don't support this. When you spill, you can evict live ranges assigned to your 'reserved' register and put them back on the work queue. See for example the RAGreedy::LRE_WillShrinkVirtReg() callback. You can choose to evict all live ranges assigned to that register and reserve it, or you can just evict the single live range crossing your spill code if you just need the register to be available for spilling. You can also use the PBQP register allocator which already supports multi-...
2011 Nov 30
2
[LLVMdev] Register allocation in two passes
...&& (VRM->getPhys(VirtReg) == REG_Y)) { LiveInterval &LI = LIS->getInterval(VirtReg); unassign(LI, REG_Y); enqueue(&LI); } } RegClassInfo.runOnMachineFunction(VRM->getMachineFunction()); // update reserve reglist So similar to what's done in LRE_WillShrinkVirtReg(), it searches for live intervals where REG_Y is allocated and evicts them for reallocation. I don't know if there's a faster way of doing this but it's working :) About your first question: the register has to be reserved throughout the whole function. Thanks for the help ------------...
2011 Nov 29
2
[LLVMdev] Register allocation in two passes
Yes, I want the register to be allocatable when there are no stack frames used in the function so it can be used for other purposes. In fact, I looked at how other backends solve this problem, but they are all too conservative by always reserving the register which in my case it is not a good solution because of the performance impact of not having this register available. I find very interesting
2011 Nov 30
0
[LLVMdev] Register allocation in two passes
...Y)) > { > LiveInterval &LI = LIS->getInterval(VirtReg); > unassign(LI, REG_Y); > enqueue(&LI); > } > } > RegClassInfo.runOnMachineFunction(VRM->getMachineFunction()); // update reserve reglist > > So similar to what's done in LRE_WillShrinkVirtReg(), it searches for live intervals where REG_Y is allocated and evicts them for reallocation. I don't know if there's a faster way of doing this but it's working :) Looks good. It is probably faster to scan the LiveIntervalUnion for REG_Y for assigned virtual registers, but the above c...