summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-11-13 23:03:47 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-11-13 23:03:47 +0000
commit6d9d30a917644302a8862d86e94928ae5253d40f (patch)
tree9264cc7e89a2e45b6084d35b303196f4c1b295b1 /llvm/utils/TableGen/CodeGenDAGPatterns.h
parentde0215ccf3cbb0db53718611fc78cf100ef1206e (diff)
downloadbcm5719-llvm-6d9d30a917644302a8862d86e94928ae5253d40f.tar.gz
bcm5719-llvm-6d9d30a917644302a8862d86e94928ae5253d40f.zip
[tablegen] Handle atomic predicates for ordering inside tablegen. NFC.
Similar to r315841, GlobalISel and SelectionDAG require different code for the common atomic predicates due to differences in the representation. Even without that, differences in the IR (SDNode vs MachineInstr) require differences in the C++ predicate. This patch moves the implementation of the common atomic predicates related to ordering into tablegen so that it can handle these differences. It's NFC for SelectionDAG since it emits equivalent code and it's NFC for GlobalISel since the rules involving the relevant predicates are still rejected by the importer. llvm-svn: 318102
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h
index 3a76ab25ea7..8b72bd6d90b 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.h
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h
@@ -505,6 +505,17 @@ public:
/// Is this predicate the predefined truncating store predicate?
bool isTruncStore() const;
+ /// Is this predicate the predefined monotonic atomic predicate?
+ bool isAtomicOrderingMonotonic() const;
+ /// Is this predicate the predefined acquire atomic predicate?
+ bool isAtomicOrderingAcquire() const;
+ /// Is this predicate the predefined release atomic predicate?
+ bool isAtomicOrderingRelease() const;
+ /// Is this predicate the predefined acquire-release atomic predicate?
+ bool isAtomicOrderingAcquireRelease() const;
+ /// Is this predicate the predefined sequentially consistent atomic predicate?
+ bool isAtomicOrderingSequentiallyConsistent() const;
+
/// If non-null, indicates that this predicate is a predefined memory VT
/// predicate for a load/store and returns the ValueType record for the memory VT.
Record *getMemoryVT() const;
OpenPOWER on IntegriCloud