This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: improved RTL-level if conversion using scratchpads [half-hammock edition]
- From: Abe <abe_skolnik at yahoo dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: Sebastian Pop <sebpop at gmail dot com>, Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Nov 2015 15:35:50 -0600
- Subject: Re: improved RTL-level if conversion using scratchpads [half-hammock edition]
- Authentication-results: sourceware.org; auth=none
- References: <563BE9A7 dot 30803 at yahoo dot com> <563C8748 dot 3040901 at redhat dot com> <563CDCAF dot 20703 at yahoo dot com> <563CE5C2 dot 5060409 at redhat dot com>
This conversation should be on-list btw.
ACK.
What I'm saying is I don't see a reason for a "definitely always unsafe" state.
Why would any access not be made safe if a scratchpad is used?
Because the RTL if-converter doesn`t "know" how to convert {everything that can be made safe using a scratchpad and is
unsafe otherwise}. My patch is only designed to enable the conversion of half-hammocks with a single may-trap store.
Kyrill`s work to make the single-store RTL conversions also work for multiple stores under a single condition may
or may not mesh nicely with my code to produce the expected combined effect. I have also not done any work yet
to enable the conversion of half-hammocks with a may-trap store _and_ a may-trap load, as in the following:
if (condition)
*dest = *src;
// no "else" or "else if"
In summary, the 3 possible analysis outcomes are something like this:
* safe even without a scratchpad
* only safe with a scratchpad, and we _do_ know how to convert it safely
* currently unsafe because we don`t yet know how to convert it safely
Which target do you actually want this for?
Ideally, all targets WITH "cmove"-like ops and withOUT
pre-64-bit-ARM-style fully-conditional execution.
Anything in particular you're working on?
Where I work we are focused on the AArch64 ISA.
Do you have performance numbers anywhere?
I think my analysis work so far on this project is not yet complete enough for
public review, mainly because it does not include the benefit of profiling.
Doing the conversion only when the profile favors doing so should remove regressions
and make the average a stronger result. As I previously mentioned, the latest version of
this patch only does the new if-conversion when the profile and the ["--param"-alterable]
threshold "tell" it to do so, except when the testing-oriented "--param" is used.
Sincerely,
Abe