File tree Expand file tree Collapse file tree 2 files changed +25
-12
lines changed Expand file tree Collapse file tree 2 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 29
29
#include " llvm/ADT/GenericConvergenceVerifier.h"
30
30
#include " llvm/ADT/PostOrderIterator.h"
31
31
#include " llvm/ADT/Twine.h"
32
- #include " llvm/IR/Intrinsics .h"
32
+ #include " llvm/IR/IntrinsicInst .h"
33
33
34
34
#define Check (C, ...) \
35
35
do { \
48
48
} while (false )
49
49
50
50
namespace llvm {
51
- static bool isConvergenceControlIntrinsic (unsigned IntrinsicID) {
52
- switch (IntrinsicID) {
53
- default :
54
- return false ;
55
- case Intrinsic::experimental_convergence_anchor:
56
- case Intrinsic::experimental_convergence_entry:
57
- case Intrinsic::experimental_convergence_loop:
58
- return true ;
59
- }
60
- }
61
-
62
51
template <class ContextT > void GenericConvergenceVerifier<ContextT>::clear() {
63
52
Tokens.clear ();
64
53
CI.clear ();
Original file line number Diff line number Diff line change @@ -1724,6 +1724,30 @@ class AssumeInst : public IntrinsicInst {
1724
1724
}
1725
1725
};
1726
1726
1727
+ // / Check if \p ID corresponds to a convergence control intrinsic.
1728
+ static inline bool isConvergenceControlIntrinsic (unsigned IntrinsicID) {
1729
+ switch (IntrinsicID) {
1730
+ default :
1731
+ return false ;
1732
+ case Intrinsic::experimental_convergence_anchor:
1733
+ case Intrinsic::experimental_convergence_entry:
1734
+ case Intrinsic::experimental_convergence_loop:
1735
+ return true ;
1736
+ }
1737
+ }
1738
+
1739
+ // / Represents calls to the llvm.experimintal.convergence.* intrinsics.
1740
+ class ConvergenceControlInst : public IntrinsicInst {
1741
+ public:
1742
+ static bool classof (const IntrinsicInst *I) {
1743
+ return isConvergenceControlIntrinsic (I->getIntrinsicID ());
1744
+ }
1745
+
1746
+ static bool classof (const Value *V) {
1747
+ return isa<IntrinsicInst>(V) && classof (cast<IntrinsicInst>(V));
1748
+ }
1749
+ };
1750
+
1727
1751
} // end namespace llvm
1728
1752
1729
1753
#endif // LLVM_IR_INTRINSICINST_H
You can’t perform that action at this time.
0 commit comments