[PATCH] RC->contains is a trap... (PR16106)

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jun 12 12:30:13 PDT 2013


On Jun 12, 2013, at 11:58 AM, Eric Christopher <echristo at gmail.com> wrote:

> Hi Jakob and Lang,
> 
> RC->contains is a trap for the register allocator since it tests the
> presence of the register in the class, however, it ignores any
> additions or removals done by an AltOrder and so shouldn't be used in
> this situation. The greedy allocator uses AllocationOrder, but the
> fast allocator doesn't and just grabs the order specifically when it
> needs it.
> 
> I see a few possible ways here:
> 
> a) the patch I've got,
> b) modify contains,
> c) use AllocationOrder in the fast allocator,
> d) something else (fix the hint? something?)
> 
> At any rate contains should probably go away or something. It just
> seems like a trap. I haven't audited all uses of contains throughout
> the compiler, but this appears to be the only use in any of the
> allocators.
> 
> Thoughts?

Is that the right PR#?

/jakob




More information about the llvm-commits mailing list