[LLVMdev] Regalloc Refactoring
sabre at nondot.org
Mon Apr 16 09:01:05 PDT 2007
On Mon, 16 Apr 2007, David Greene wrote:
> Chris Lattner wrote:
>>> Doesn't 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?
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
More information about the llvm-dev