> The PIC register setup code is emitted after NOTE_INSNS_FUNCTION_BEG,
> because it uses the insert_insn_on_edge mechanism, and the corresponding
> insertion in cfgexpand.c:gimple_expand_cfg takes care to insert the code
> after the parm_birth_insn:
> ...
>             /* Avoid putting insns before parm_birth_insn.  */
>             if (e->src == ENTRY_BLOCK_PTR
>                 && single_succ_p (ENTRY_BLOCK_PTR)
>                 && parm_birth_insn)
>               {
>                 rtx insns = e->insns.r;
>                 e->insns.r = NULL_RTX;
>                 emit_insn_after_noloc (insns, parm_birth_insn, e->dest);
>               }
> ...
> And in the case for this test-case, parm_birth_insn is the
> NOTE_INSNS_FUNCTION_BEG.

So this means that parm_birth_insn can never be null, right?

> 2013-10-13  Tom de Vries  <t...@codesourcery.com>
> 
>       * cfgexpand.c (gimple_expand_cfg): Don't commit insertions after
>       NOTE_INSN_FUNCTION_BEG.
> 
>       * gcc.target/arm/require-pic-register-loc.c: New test.

OK if you also remove the test on parm_birth_insn.

-- 
Eric Botcazou

Reply via email to