Hi, On Wed, 6 May 2009, Mark Mitchell wrote:
> >> How about emitting a set at each place the PIC register is needed, > >> and making sure that gcse will will common these sets where > >> appropriate? > > > I'd rather not. -O0 code is bad enough already; and this just makes > > more work for the compiler. > > I agree. > > What was the underlying fundamental change here that made the ARM > strategy stop working? expansion of PHI nodes has to take place when the tree hooks are still active. While those are active the basic blocks can't yet be expanded from GIMPLE to RTL (and more generally you can't emit RTL instructions into what later becomes the normal RTL insn stream). But expansion of PHI nodes geneates RTL move instructions, which can trigger the need of PIC registers. So that load can't be emitted where it currently is tried to emit (namely entry_of_function(), which points to a basic block that still is in GIMPLE form at this time). I'll have to make a new place for such instructions that can be used for storing away instructions for the start of function until they can be emitted into the normal insn stream. Ciao, Michael.