]> granicus.if.org Git - llvm/commitdiff
[SDAG] Add a isSimple cover functon to MemSDNode, just as we have in IR/MI [NFC]
authorPhilip Reames <listmail@philipreames.com>
Mon, 9 Sep 2019 20:06:19 +0000 (20:06 +0000)
committerPhilip Reames <listmail@philipreames.com>
Mon, 9 Sep 2019 20:06:19 +0000 (20:06 +0000)
Uses are in reviews D66322 and D66318.  Submitted separately to control rebuild times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371445 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAGNodes.h

index d542ea13f777beb49077fc6170be78ac79bb32c2..2b00b8568705ed2b463ea988ae95048aa1c84a64 100644 (file)
@@ -1361,6 +1361,9 @@ public:
   /// aliasing rules.
   bool isUnordered() const { return MMO->isUnordered(); }
 
+  /// Returns true if the memory operation is neither atomic or volatile.
+  bool isSimple() const { return !isAtomic() && !isVolatile(); }
+
   /// Return the type of the in-memory value.
   EVT getMemoryVT() const { return MemoryVT; }