[PATCH] D10276: [SROA] Fix for PR23737: Handle Atomic when rewriting Loads and Stores

Chandler Carruth chandlerc at gmail.com
Fri Jul 10 23:39:08 PDT 2015


chandlerc added a comment.

I don't think SROA is incorrect here. I'll comment on the bug, and we can sort out whether there is a bug here or not.

However, even if there is a bug, we shouldn't turn *off* SROA due to atomics, we should just preserve atomicity when necessary.

Specifically, if we can promote an alloca to an SSA variable, then only this thread references it, and so no synchronization could be occuring through the atomic accesses.

We can (and should) add instcombine patterns to strip these kinds of atomic flags as well, but we often want SROA to work even without instcombine having run in order to minimize the runs necessary in the inliner/sroa iteration sequence.


Repository:
  rL LLVM

http://reviews.llvm.org/D10276







More information about the llvm-commits mailing list