[LLVMdev] Question about coalescing

David Greene dag at cray.com
Mon Dec 17 12:22:45 PST 2007


On Monday 17 December 2007 14:06, Fernando Magno Quintao Pereira wrote:
> Dear Dave, Evan, thank you for answering.
>
>      What I did was to remove the implementation of most of the methods of
> SimpleRegisterCoalescing and put them in a single class
> (RegisterCoalescer_Impl) that is not an analysis. Any class that wants
> these methods, can extend this class privately, or can use a reference to
> an RegisterCoalescer_Impl object. I wish it would be possible to go even
> further: given that I know that two virtuals do not interfere, I would
> like to coalesce them by simply joining their interval representation.
> When I call JoinCopy, the method does that, but it checks again a lot of
> information that I already know: do not overlap, are virtuals, etc.

Right.  So it does more work than necessary.  I haven't verified this, but I
suppose it's possible that your (or my) coalescer might things something
is legal when SimpleRegisterCoalescing does not, or vice-versa.  Have you
thought about the implications of this possibility?

How do you handle dataflow upsdates in your coalescer?  JoinCopy does
all that stuff, so I assume you just let that handle it.  JoinCopy also 
updates some data structures internal to SimpleRegisterCoalescing, so
again, it does more work than necessary.

                                               -Dave



More information about the llvm-dev mailing list