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] | |
On 12/15/2015 01:42 PM, Paul_Koning@Dell.com wrote:
Precisely. And it's these kind that are subject to "oh, surprise, gcc-new does some new optimization of loads/stores and your previously working code now fails miserably". Oh, and good luck finding it, these kinds of things are notoriously tough to track down.On Dec 15, 2015, at 7:52 AM, Bernd Schmidt <bschmidt@redhat.com> wrote: On 12/14/2015 09:10 AM, Segher Boessenkool wrote:That, and adding a memory clobber degrades performance for a lot of existing basic asm that does not expect the clobber, e.g. asm(""), asm("#"), asm("nop"), ...I wonder about this. People keep bringing up "a lot of existing basic asm" in general, but are there any known examples in real software?In the codebase for the product I work on, I see about 200 of them. Many of those are the likes of asm("sync") for MIPS, which definitely wants to be treated as if it were asm ("sync" : : : "memory").
And that is bad on so many levels.The only sensible way forward is to treat them like memory barriers. That's what is expected and that is what we should be doing. The fact that we haven't done it is simply a bug.
The fact that someone might lose the ability to do memory optimizations across asm ("") or asm ("#") or asm ("nop") is not reason to keep the status quo.
Sadly, I'm putting most of this discussion into my gcc-7 queue anyway. Jeff
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |