[PATCH] D59345: Allow code motion (and thus folding) for atomic (but unordered) memory operands

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 08:36:43 PDT 2019


jfb accepted this revision.
jfb added a comment.
This revision is now accepted and ready to land.

Overall this looks good.
Do you have tests with intervening fences (both atomic and thread), to make sure they block motion as expected?

I'm trying to figure out if this optimization is only correct for `memory_order_java`, or if it also applies to `memory_order_relaxed`. I can't see a case in your examples which wouldn't apply to `memory_order_relaxed` as well. @__simt__ WDYT?
I'm not asking you to do that work. It just seems like a valid follow-up.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59345/new/

https://reviews.llvm.org/D59345





More information about the llvm-commits mailing list