------- Comment #39 from bangerth at dealii dot org 2007-05-04 04:54 ------- >From my perspective as a user, I wouldn't find a memory clobber in front of every placement new all that terrible. People don't do that in tight loops, and even if they did all that would happen is that the clobber presents a barrier across which no memory accesses can be moved and across which no dead stores etc can be eliminated. Presumably with every placement new/delete, there comes some housekeeping of available memory, so there will be a significant amount of code before and after, and so a single barrier isn't going to have the effect of slowing down a code by any significant factor.
This appears to me to be a case where one could overengineer a solution. I would just go with the memory clobber and see whether we get bug reports of people complaining about missed optimizations :-) W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286