On 12/15/2015 02:13 PM, Jakub Jelinek wrote:
On Tue, Dec 15, 2015 at 09:51:15PM +0100, Eric Botcazou wrote:
rtx_renumbered_equal_p considers two LABEL_REFs equivalent if they
have the same next_real_insn, unfortunately next_real_insn doesn't ignore
debug insns.  It ignores BARRIERs/JUMP_TABLE_DATA insns too, which is IMHO
not desirable either, so this patch uses next_nonnote_nondebug_insn instead
(which stops at CODE_LABEL) and keeps iterating if CODE_LABELs are found.

next_active_insn would have done the job, modulo the BARRIER thing, but do we
really need to care about BARRIER here?

I don't know.  For void foo (void) { lab: __builtin_unreachable (); }
we have a BARRIER ending a bb with no control flow insns in there, say with:
Given the ill-formed nature of __builtin_unreachable, I think the sensible thing is to require BARRIERs to match as well. If we don't, then we could consider paths which differ only in the existence of a BARRIER. If we cross jump them, then we either lose the BARRIER/__builtin_unreachable property or we add it where it wasn't before.

Jeff

Reply via email to