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: Asm volatile causing performance regressions on ARM


 Hello!

> > This code (introduced in
> > http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=193802) aborts
> > CSE after seeing a volatile inline asm.
> 
> Note that "introduced" is not really correct here, the code had been
> there for a long time but it was treating some volatile asms as
> barriers and some others as not.  Now it treats them all as barriers.

 Yes, actually you are right. This behavior really was there for a while,
just triggering condition has been changed. On older gcc version we also
could reproduce this behavior by changing 'asm("":::"memory")' to
'asm("":::)' in our test example. Looks like volatile asm with empty clobber
list previously was considered even more strict than one with explicit
"memory" clobber.
 So, the main question is not about triggering condition, but about the
behavior itself. Is it correct to flush and reload all constants ? They are
constants after all, they are even not stored in .data section but inlined
in the code, and thus cannot be modified.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



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