Atomic store with Release semantic allows re-ordering of unordered load/store before the store.
Implement it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | ||
---|---|---|
565–573 | I don't this comment holds. We can get here with SI being e.g. a ceq_cst store. Reordering that with just about anything is illegal. The prior change to check is non-unordered instead of non-simple looks reasonable, but the change below doesn't seem to follow. |
llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | ||
---|---|---|
565–573 | Thank you, Philip for starting review. I tend to disagree with you. This is how I read specs. c++(https://en.cppreference.com/w/c/atomic/memory_order): So Store with seq_cst is a Store Release and prohibit re-ordering with any another seq_sct instruction. Do I miss anything? |
LGTM
I'm convinced on the seq_cst case.
I went ahead and landed an expanded version of your new test file. Please rebase and sanity check that none of the new tests give unexpected results before committing. No further review needed unless you see something weird.
I don't this comment holds. We can get here with SI being e.g. a ceq_cst store. Reordering that with just about anything is illegal.
The prior change to check is non-unordered instead of non-simple looks reasonable, but the change below doesn't seem to follow.