[PATCH] D57129: [SimpleLoopUnswitch] Early check exit for trivial unswitch with MemorySSA.

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 17:44:21 PST 2019


george.burgess.iv added inline comments.


================
Comment at: lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:852
+      if (auto *Defs = MSSAU->getMemorySSA()->getBlockDefs(CurrentBB))
+        if (!isa<MemoryPhi>(*Defs->begin()) || (++Defs->begin() != Defs->end()))
+          return Changed;
----------------
Do atomic ops fall in the same "we care and should exit now" bucket as volatile loads for this?

MSSA uses MemoryDefs to represent `fence`s and atomic loads with ordering > `unordered`.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57129





More information about the llvm-commits mailing list