This is the mail archive of the
mailing list for the GCC project.
Re: [Question, C6X] Under what situations should we disable DCE in sched2?
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Felix Yang <fei dot yang0953 at gmail dot com>, <gcc at gcc dot gnu dot org>
- Cc: <feilix dot yang at huawei dot com>
- Date: Thu, 27 Mar 2014 18:54:49 +0100
- Subject: Re: [Question, C6X] Under what situations should we disable DCE in sched2?
- Authentication-results: sourceware.org; auth=none
- References: <CAFc0fxy_Y6BcH+ruArnxXR11+UsQCfT7558Qwt6pYxrzZ81jnQ at mail dot gmail dot com>
On 03/27/2014 02:50 PM, Felix Yang wrote:
I find DCE in sched2 is disabled for C6X backend. Is this a
performance consideration? Or a GCC BUG?
As far as I remember, it's a problem due to how delayed instructions are
represented to the final scheduler. Just before that scheduling pass is
run, the actual instruction is turned into just an UNSPEC without
visible side effects, and a shadow insn that describes the side effect
is created. The scheduler ensures that the shadow insn always occurs
after a fixed time from the real insn (set up by record_delay_slot_pair).
Any pass other than the scheduler would be confused by this
representation (and by the delayed effects in general), that includes DCE.