Bernd Schmidt <bernds_...@t-online.de> writes: > Ian Lance Taylor wrote: > >> No, that makes no sense. What I'm suggesting is that we fix the stack >> offsets of all local variables before register allocation, based on a >> conservative assessment of how many registers will be saved on the >> stack. > > The conservative assessment is that all pseudos go on the stack. > However, this way you'll generate terrible code.
I think the number of pseudos on the stack is irrelevant. You put each one farther down the stack at a known offset. The only interesting number to choose is how many registers will need to be saved on the stack. > I don't really understand why people want to remove reload only to > implement the same thing elsewhere. There are only two major problems > with reload IMO: > - the RELOAD_FOR_xxx mechanism of scheduling reload insns is terrible > - so is the inheritance code > Even so, the number of bugs in these seems to have dropped off over the > years. The problem with reload is that it interferes with register allocation. Even if gcc had a perfect register allocator, we would still generate suboptimal code because reload would mess up the allocation. The key to solving that problem is that we need to do instruction selection (in gcc terms, picking which insn alternative to use) either before register allocation or in conjunction with it. Ian