Posted Aug 10, 2012 17:33 UTC (Fri) by nix
In reply to: ACCESS_ONCE()
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.)
to post comments)