[PATCH] D15592: [LICM] Make store promotion work in the face of unordered atomics
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 14:57:00 PST 2016
hfinkel added a comment.
> Promoting the non-atomic accesses to atomic would be incorrect.
> Hans pointed out another issue worth adding a test for: you can't remove all atomic accesses from loops which aren't proven to terminate (or otherwise have I/O, volatile, synchronization):
> Also, parts of the C++ standards committee thinks that the standard should "discourage non-normatively aggressive optimizations, e.g across large or unbounded loops" in the context of p0062r0.
Philip, can you comment on the original use cases here? Are there cases where indefinitely postponing the write (because, say, the loop ended up not terminating) would be acceptable?
More information about the llvm-commits