This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [-ftree-cselim desoptimizes SH code


That's complex if we don't want to me limited to "special cases". I recorded the issue in [Bug tree-optimization/41486].

In the meantime, disabling it for SH (possibly all non HAVE_conditional_execution targets) should be a win.

Cheers

Christian


Richard Guenther wrote:
On Mon, Sep 28, 2009 at 11:28 AM, Christian BRUEL
<christian.bruel@st.com> wrote:
yes, but it's not only the call. this optimization makes a lot of bets about
what will DSE to be profitable. For instance any may alias memory operation
in the path such as

foo(int *a, int r)
{
   *a = 0;
   *pt = 2;
   if (r)
     *a = r;
}

is enough to void the benefits of this optimisation, with or without ifc.

Sure, that's an area where the pass could be improved (well, with the obvious impact on compile-time). And if it does that it probably can as well eliminate the redundant load as well. Which makes me think that this variant of store-sinking may fit into the PRE framework (it's really a sort of partially dead code elimination).

Richard.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]