This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA][rtl-optimization/52714] Do not allow combine to create invalid RTL
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Feb 2014 10:06:51 +0100
- Subject: Re: [RFA][rtl-optimization/52714] Do not allow combine to create invalid RTL
- Authentication-results: sourceware.org; auth=none
- References: <52F421F5 dot 4000203 at redhat dot com> <1550848 dot K9rFO0CFun at polaris> <52F87050 dot 90206 at redhat dot com>
> I pondered changing the condition for swapping the insn order, but it
> didn't seem worth it. I doubt we see many 3->2 combinations where I3 is
> a JUMP_INSN, the result turns into two simple sets and the insn swapping
> code you wrote decides it needs to swap the insns.
I didn't actually write it, just enhanced it recently, that's why I suggested
to do the same here. It's one line of code and we have an example of valid
simplification at hand so I think we ought to do it.
> It seems to me that as long as we're re-using the existing insns to
> contain the simple sets that we have to ensure that they're INSNs, not
> CALL_INSNs or JUMP_INSNs.
I disagree, nullifying JUMP_INSNs by changing them to (set (pc) (pc)) is a
standard method in the combiner.
--
Eric Botcazou