This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: Properly check the end of basic block
On Thu, Nov 18, 2010 at 10:38 AM, Uros Bizjak <email@example.com> wrote:
> On Thu, Nov 18, 2010 at 6:32 PM, H.J. Lu <firstname.lastname@example.org> wrote:
>>>> insn != BB_END (bb) && NEXT_INSN (insn) == NEXT_INSN (BB_END (bb))
>>>> We should check NEXT_INSN (insn) != NEXT_INSN (BB_END (bb)) in
>>>> move_or_delete_vzeroupper_2. ?This patch does it.
>>> Huh? The loop does simple linear scan of all insns in the bb, so it
>>> can't miss BB_END. IIUC, in your case the bb does not have BB_END
>>> (bb), but it has NEXT_INSN (BB_END (bb))?
>>> Can you please provide a test case that illustrates this?
>> ix86_pad_returns forgot to update BB_END when it
>> replaces it with a new one. OK for trunk?
> IMO, ?you should just move the call to vzeroupper optimization to be
> the first thing in ix86_reorg. This way, ix86_pad_short_function,
> ix86_pad_returns and ix86_avoid_jump_mispredict will also count
> emitted vzeroupper.
But it will leave bad BB_END in place. Any uses of BB_END later
will still be screwed.
> The only possible drawback of this approach would be different
> position of nops w.r.t to vzeroupper in case of
That is one issue.