ACCESS_ONCE()
Posted Aug 10, 2012 17:33 UTC (Fri) by
nix (subscriber, #2304)
In reply to:
ACCESS_ONCE() by quanstro
Parent article:
ACCESS_ONCE()
personally, i find this sort of code reorg by compilers
to be problematic as it generally makes code quite hard
to reason about.
I'm curious. Why don't you say the same about register allocation? Combined with stack spilling, that can often have the same effect as code motion. How do you plan to get rid of that?
(I've seen this from various safety-critical embedded people too: they want the compiler to 'not optimize'. I've tried pointing out that this is a meaningless request, that translation necessarily implies many of the same transformations that optimization does, but they never seem to get it. What they generally *mean* is that they want the smallest possible number of transformations -- or perhaps that they want the transformations to be guaranteed bug-free.)
(
Log in to post comments)