search for: coallesc

Displaying 20 results from an estimated 75 matches for "coallesc".

Did you mean: coallesce
2006 Dec 23
1
[LLVMdev] Possible bug in the linear scan register allocator
...ed, it sounds as the same bug. Two questions: 1) At least, it would be better if LLVM would crash on an assertion instead of running for ever in such situations. I think this can be easily detected, since this is a case where nothing could be spilled. 2) You write in PR711: >This is due to the coallescer coallescing virtregs with both EAX and >EDX, which makes them unavailable to satisfy spills, causing the RA to >run out of registers. We want to coallesce physregs when possible, >but we cannot pin them in the spiller: >we have to be able to >uncoallesce them. First of all, I...
2007 Apr 12
0
[LLVMdev] Regalloc Refactoring
...locators might > like to do coalescing differently (e.g. graph coloring does it by > examining the interference graph). It would also allow different > heuristics and coalescing strategies. Ok. Another thing to ponder on: Our current phi elimination pass is the source of many of our coallescing-related issues. Currently, each phi is lowered into one copy for the result and one copy for each input. This is a *lot of copies*! This is a problem both for coallescing (because it has to do so much, it is required to be very aggressive) and compile time (phi elim + coallescing is much...
2007 Apr 16
1
[LLVMdev] Regalloc Refactoring
...ange splitting, register allocation and spilling? > > This is one of the reasons I want to separate all of these concerns. > We shouldn't force developers to always coalesce or always use some > generic measure of spill cost. In my mind (a dangerous place to go), it's not about coallescing vs spilling, it's about splitting vs spilling. In particular, coallescing does increase live ranges of values, but you can have the same increase from code written without copies. Basically, not doing aggressive copy coallescing means that you are dependent on the user telling you wher...
2007 Apr 16
2
[LLVMdev] Regalloc Refactoring
...that last statement actually do the rewrite? > > Hrm, yes, yes it appears so. Question is: doesn't this make the r2r map > dead? Does something else fill it in? My memory is hazy here :). If it > is dead, we should rip it out (actually, we should make it private to the > coallescer function). I'm trying an experiment to eliminate the r2r map altogether. Is there an efficient way to replace all references to a virtual register? That is, given a virtual register number, is there an easy way to get a list of all Instructions and/or Operands that reference it? I've...
2007 Apr 12
8
[LLVMdev] Regalloc Refactoring
...definitely interested in improving coalescing and it sounds like this would fall under that work. Do you have references to papers that talk about the various algorithms? > Beyond that, one of the issues is the "r2rmap" and "rep" function. As > you've noticed, the coallescer basically uses these to avoid rewriting the > code after it does coallescing. For example, if r1024 is coallesced with > r1026, it leaves all uses of both registers in the code, instead of > rewriting uses of r1026 with r1024 and deleting all memory of r1026. This > mades sense l...
2007 Apr 16
0
[LLVMdev] Regalloc Refactoring
...ast statement actually do the rewrite? >> Hrm, yes, yes it appears so. Question is: doesn't this make the r2r map >> dead? Does something else fill it in? My memory is hazy here :). If it >> is dead, we should rip it out (actually, we should make it private to the >> coallescer function). > > I'm trying an experiment to eliminate the r2r map altogether. Is there > an efficient way to replace all references to a virtual register? That > is, given a virtual register number, is there an easy way to get a list > of all Instructions and/or Operands that...
2007 Apr 14
0
[LLVMdev] Regalloc Refactoring
On Thu, 12 Apr 2007, David Greene wrote: >> Beyond that, one of the issues is the "r2rmap" and "rep" function. As >> you've noticed, the coallescer basically uses these to avoid rewriting the >> code after it does coallescing. For example, if r1024 is coallesced with >> r1026, it leaves all uses of both registers in the code, instead of >> rewriting uses of r1026 with r1024 and deleting all memory of r1026. This >> m...
2007 Apr 12
3
[LLVMdev] Regalloc Refactoring
Hi all, As I work toward improving LLVM register allocation, I've come across the need to do some refactoring. Specifically, I would like to separate register coalescing from live interval analysis. Right now LiveIntervals handles both. The reason I want to separate them is that other types of register allocators might like to do coalescing differently (e.g. graph coloring does it by
2007 Apr 16
3
[LLVMdev] Regalloc Refactoring
Chris Lattner wrote: > No there isn't, unfortunately. I'd suggest building up/maintaining the > r2r map inside the coallescer. Once the coallescer is done with the > entire function, do a single pass over the function rewriting all the > coallesced vregs. Ok. I have a version with the coalescer separated from liveIntervalAnalysis. It still uses the r2r map but as we discussed late last week, it looks like th...
2005 Aug 16
0
Packets being coallesced
Here''s a peculiar one. I''m trying to simulate some speed effects due to varying sized packets so I have written a quick perl app which spits out packets of a fixed size (<1500 bytes). What I''m finding is the despite apparently turning off nagle and everything else I can think of I still notice that when the receiver isn''t keeping up that the sending
2007 Apr 16
0
[LLVMdev] Regalloc Refactoring
...d Greene wrote: >>> As I work toward improving LLVM register allocation, I've >>> come across the need to do some refactoring. Yay! >> Beyond that, one of the issues is the "r2rmap" and "rep" >> function. As >> you've noticed, the coallescer basically uses these to avoid >> rewriting the >> code after it does coallescing. For example, if r1024 is >> coallesced with >> r1026, it leaves all uses of both registers in the code, instead of >> rewriting uses of r1026 with r1024 and deleting all memory of...
2006 Jun 30
0
[LLVMdev] Removing dead code
On Fri, 30 Jun 2006, Fernando Magno Quintao Pereira wrote: > where %reg1032 is dead. Right. One of the jobs of the register allocator is to coallesce register copies. Once coallesced, they can be removed. > I'm removing these instructions. In Linear scan, they are removed too. > I'm removing all the dead definitions from instructions that are not > function calls, and the resulting programs seem to work fine. The ratio I...
2007 Apr 16
0
[LLVMdev] Regalloc Refactoring
Chris Lattner wrote: > On Thu, 12 Apr 2007, Fernando Magno Quintao Pereira wrote: >>> I'm definitely interested in improving coalescing and it sounds like >>> this would fall under that work. Do you have references to papers >>> that talk about the various algorithms? >> Some suggestions: >> >> @InProceedings{Budimlic02, >> AUTHOR =
2007 Apr 14
6
[LLVMdev] Regalloc Refactoring
On Thu, 12 Apr 2007, Fernando Magno Quintao Pereira wrote: >> I'm definitely interested in improving coalescing and it sounds like >> this would fall under that work. Do you have references to papers >> that talk about the various algorithms? > > Some suggestions: > > @InProceedings{Budimlic02, > AUTHOR = {Zoran Budimlic and Keith D. Cooper and Timothy
2006 Dec 22
0
[LLVMdev] Possible bug in the linear scan register allocator
On Thu, 21 Dec 2006, Roman Levenstein wrote: > following: > 1) some of the fixed registers intervals are merged with some virtual > registers intervals > 2) later there is a need to spill one of the allocated registers, but > since all joined intervals are FIXED intervals now due to (1), they > cannot be spilled. Therefore, the register allocator loops for ever. > > I would
2006 Jun 30
3
[LLVMdev] Removing dead code
> > It seems to me that the only instructions > > with dead definitions that I should not remove are the calls. Is it true? > > I would like to know if a code like this below is safe, that is, besides > > call instructions, is there other instructions that must stay in the code > > even if their definitions are dead? > > > > MachineInstr * mi = iter; >
2004 Jun 23
3
[LLVMdev] Linearscan allocator bug?
...known<"if <>0 goto">; ..... Should this work? > Also, if you haven't already, you might want to teach TargetInstrInfo > that '=' is a move instruction (implement isMoveInstr), so instructinos > like 'gr1 = gr1' will go away and you'll get coallescing. :) BTW, is it possible to set some instruction flag, instead of overriding a function? Something like: let isMove = 1 in def MOVE :..... ? - Volodya
2006 May 31
2
[LLVMdev] [RFC, ARM] expanding RET to CopyToReg;BRIND
...like this: > > > CL = shamt_virtreg > X = shl Y, CL > > We don't want the copy and shift to wander apart from each other (e.g. we > don't want another shift to get scheduled in between them), so we flag > them together. In practice, these copies usually get coallesced away. In the second case shl explicitly uses CL. Shouldn't the register allocator be smart enough to avoid scheduling an instruction that destroys CL in between them? In the first case, what do you think about making it possible for an instruction to optionally depend on a value? That is, ma...
2005 Jul 26
0
[LLVMdev] How to partition registers into different RegisterClass?
...d be represented as explicit registers, and the GPRs should be virtual registers. This would give you code that looks something like this: %reg1024 = add v1, c1 %reg1025 = mul v1, c2 %reg1026 = mul %reg1024, %v2 %o1 = mov %reg1026 The 'mov' register-to-register copy instruction will be coallesced and eliminated by the register allocator. The regalloc will eliminate the virtual registers, assigning physical GPRs. This is what the 'allocation order' is to cover. > I planed to partition the register into different RegisterClass: > input, output, general purpose, constant,...
2005 Sep 07
1
[LLVMdev] LiveIntervals, replace register with representative register?
...l register if we ever joined > an interval of a real register with one of a virtual register (and this > real register will be the representative register of the set of > intervals joined together). I understand the representative register could be a physical (real) register if one of the coallescing register is a physical register. But the code _uncondtionally_ changes MachineOperand::optype to MO_MachineRegister, why? (Same question as my previous post) -- Tzu-Chien Chiu, 3D Graphics Hardware Architect <URL:http://www.csie.nctu.edu.tw/~jwchiu>