This is the mail archive of the
mailing list for the GCC project.
[ping] [PATCH] Fix pr57637
- From: Zhenqiang Chen <zhenqiang dot chen at linaro dot org>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Earnshaw <rearnsha at arm dot com>
- Date: Mon, 22 Jul 2013 13:48:46 +0800
- Subject: [ping] [PATCH] Fix pr57637
- References: <CACgzC7Cab2ke3L0AqGUvqdxg-PEf2r-xkwHq=OYu4UviEhyw6g at mail dot gmail dot com> <17842494 dot JlJor7ihF6 at polaris> <CACgzC7DVCmA4U3V_jhMyw7GYWTzdCgNp0EqcEtWYTn1dqNh3TA at mail dot gmail dot com>
Is the updated patch OK for trunk?
On 16 July 2013 17:29, Zhenqiang Chen <email@example.com> wrote:
> On 11 July 2013 18:31, Eric Botcazou <firstname.lastname@example.org> wrote:
>>> Shrink-wrap optimization sinks some instructions for more
>>> opportunities. It uses DF_LR_BB_INFO (bb)->def to check whether BB
>>> clobbers SRC. But for ARM, gcc might generate cond_exec insns before
>>> shrink-wrapping. And DF_LR_BB_INFO (bb)->def does not include def info
>>> from cond_exec insns. So the check in function
>>> move_insn_for_shrink_wrap is not enough.
>> Posting a testcase would be even better, but the analysis looks plausible.
>> DF_REF_CONDITIONAL and DF_REF_PARTIAL defs aren't killing defs so they are not
>> included in the def set for LR.
>> As you pointed out, they are included in the gen set for LIVE if it exists, so
>> I guess we should wonder if we really want to do the scanning if LIVE doesn't
>> exist, i.e. at -O1, instead of simply giving up. In any case, the scanning
> The patch is updated based the comments: it will check GEN set of LIVE
> if df_live exists. Otherwise, just give up.
> And a testcase is included in the attached patch.
>> doesn't need to be redundant with the previous work, so:
>> if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL)))
>> is missing in the patch.
>> Eric Botcazou