This is the mail archive of the gcc@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: volatile access optimization (C++ / x86_64)


On Mon, Jan 5, 2015 at 12:53 PM, DJ Delorie <dj@redhat.com> wrote:
>
> Matt Godbolt <matt@godbolt.org> writes:
>> GCC's code generation uses a "load; add; store" for volatiles, instead
>> of a single "add 1, [metric]".
>
> GCC doesn't know if a target's load/add/store patterns are
> volatile-safe, so it must avoid them.  There are a few targets that have
> been audited for volatile-safe-ness such that gcc *can* use the combined
> load/add/store when the backend says it's OK.  x86 is not yet one of
> those targets.

Really?  I thought x86 was one of the few that were known to be ok
here.  What is involved with the auditing?


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