Register allocation cost question
Segher Boessenkool
segher@kernel.crashing.org
Tue Oct 10 19:09:30 GMT 2023
Hi Andrew,
On Tue, Oct 10, 2023 at 04:11:18PM +0100, Andrew Stubbs wrote:
> I'm also seeing wrong-code bugs when I allow more than 32 new registers,
> but that might be an unrelated problem. Or the allocation is broken? I'm
> still analyzing this.
It could be connected. both things should not happen.
> If it matters, ... the new registers can't be used for general purposes,
What does this mean? I think you mean they *can* be used for anything,
you just don't want to (maybe it is slow)? If you make it allocatable
registers, they *will* be allocated for anythin the compilers deems a
good idea.
> so I'm trying to set them up as a temporary spill destination. This
> means they're typically not busy. It feels like it shouldn't be this
> hard... :(
So what did you do, put them later in the allocation order? Make their
register_move_cost higher than for normal registers (but still below
memory_move_cost)? Or what? TARGEt_SPILL_CLASS maybe?
Segher
More information about the Gcc
mailing list