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: improved RTL-level if conversion using scratchpads [half-hammock edition]


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


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