[LLVMdev] Multi-class register allocatable only in one class
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Sep 13 11:18:22 PDT 2010
On Sep 13, 2010, at 6:59 AM, Carlos Sánchez de La Lama wrote:
> Hi people,
>
> the LinearScan register allocator tries to use same register for both
> live intervals, if the new interval is defined by a register copy
> whose destination reg is compatible with the source register. This is
> ok. However, this "check for compatibility" is wrongly done IMHO.
>
> Say I have regclass1 with reg A, and regclass2 with regs {A, B}, but
> regclass2 defines only "B" as allocatable by RA.
The register allocator assumes in many places that a register is either allocatable or reserved independently of the register class.
That is, if a register is allocatable in one register class, it is assumed to be allocatable from all register classes where it is present.
What are you trying to model?
/jakob
More information about the llvm-dev
mailing list