4 ms·
"It's going to kill performance, but it's legal to do." Sure, but it's going to cause the optimizer to do different things than it would have to that variable.
by DannyBee 12y ago
"It's going to kill performance, but it's legal to do."
Sure, but it's going to cause the optimizer to do different things than it would have to that variable. As I said, this essentially changes what the compiler is allowed to do, and will expose or hide bugs (usually hide if it hurts the optimizer) :)
One only has to look at the bugzilla's of gcc and llvm to discover all sorts of fun things that barriers hide/expose.
- skybrian 12y agoIt's clearly not useful for tracking down compiler bugs, but might still be useful for more ordinary bugs in single-threaded user code.