> -----Original Message----- > From: Ramana Radhakrishnan [mailto:ramana....@googlemail.com] > Sent: Wednesday, November 21, 2012 6:02 AM > To: Bin Cheng > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH ARM]Define LOGICAL_OP_NON_SHORT_CIRCUIT for ARM target > > On Fri, Nov 16, 2012 at 5:37 AM, Bin Cheng <bin.ch...@arm.com> wrote: > > Hi, > > This patch defines LOGICAL_OP_NON_SHORT_CIRCUIT for ARM target and > > prefers short circuit for armv6-m and Thumb2+Os. > > > > I tested the patch on arm-none-eabi on armv6-m/Thumb2 for both Os/O2. > > The patch introduces new fails on ARMv6-m: > > > > gcc/testsuite/gcc.dg/pr19105.c > > gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c > > gcc/testsuite/gcc.dg/tree-ssa/vrp47.c > > These tests depends on non-short-circuit IR, which is not > > generated because we prefer short circuit on ARMv6-m now. I modified > > the tests to skip them on ARMv6-m. > > > > gcc/testsuite/gcc.dg/uninit-pred-8_b.c > > Root cause: tree-ssa-uninit.c computes control dependent chain > > for uses/def of variable and checks whether each use is guarded by > > def. It has a upper bound on the number of control dependent > > chains(MAX_NUM_CHAINS==8) and just retreat to false warning if the > > number of chains exceeds MAX_NUM_CHAINS. In our scenario, the number > > of chains exceeds MAX_NUM_CHAINS because we prefer short circuit now, > resulting in false warning information. > > These false warning cannot be fully removed if the MAX_NUM_CHAINS > > exists, but we can improve it in following way: There are lots of > > invalid control dependent chains computed in tree-ssa-uninit.c now and > > should be pruned. I have already implemented a quick fix and it works > > for our scenario. I can take this problem once I get some time. > > Please keep track of this in a separate bugzilla entry. I will file a bug about this later.
> > > > > > > This is an backend patch and not a bug fix, I am not sure whether it > > can go in trunk or I have to wait for GCC4.9? > > > OK for trunk. > > Ramana > > > > > Thanks > > > > 2012-11-16 Bin Cheng <bin.ch...@arm.com> > > > > * config/arm/arm-cores.def (cortex-m1, cortex-m0) > > (cortex-m0plus): Use v6m. > > * config/arm/arm-protos.h (tune_params): Add > > logical_op_non_short_circuit. > > * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune) > > (arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune) > > (arm_cortex_tune, arm_cortex_a15_tune, arm_cortex_a5_tune) > > (arm_cortex_a9_tune, arm_fa726te_tune): Set > > logical_op_non_short_circuit field. > > (arm_v6m_tune): New tune_params struct. > > * config/arm/arm.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define. > > > > gcc/testsuite/ChangeLog > > 2012-11-16 Bin Cheng <bin.ch...@arm.com> > > > > * gcc.dg/pr19105.c: Skip on armv6-m. > > * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Ditto. > > * gcc.dg/tree-ssa/vrp47.c: Ditto. Committed as r193687 in TRUNK. I did not change test case gcc.dg/pr19105.c because Jakub had a patch also fixing this and already got approved/committed. See http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00361.html Thanks