From: Philip Reames Date: Mon, 9 Sep 2019 20:06:19 +0000 (+0000) Subject: [SDAG] Add a isSimple cover functon to MemSDNode, just as we have in IR/MI [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e83be01775e95a92378d98524d715320ab09e36f;p=llvm [SDAG] Add a isSimple cover functon to MemSDNode, just as we have in IR/MI [NFC] 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 --- diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index d542ea13f77..2b00b856870 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -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; }