Why are unnecessary atomic loads not optimized away?

前端 未结 0 868
隐瞒了意图╮
隐瞒了意图╮ 2021-01-12 16:59

Let\'s consider this trivial code:

#include 

std::atomic a;
void f(){
    for(int k=0;k<100;++k)
        a.load(std::memory_orde         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题