LLVM: include/llvm/IR/CmpPredicate.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_IR_CMPPREDICATE_H
14#define LLVM_IR_CMPPREDICATE_H
15
18
19namespace llvm {
20
21
22
25 bool HasSameSign;
26
27public:
28
30
31
32
34 : Pred(Pred), HasSameSign(HasSameSign) {
36 }
37
38
39
41
42
44
45
46
48
49
50
51
52
53
54
55
56
57
60
61
62
63
64
66
67
70
71
72
75
76
77
79
80
82
83
85};
86}
87
88#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This class is the base class for the comparison instructions.
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
static bool isIntPredicate(Predicate P)
An abstraction over a floating-point predicate, and a pack of an integer predicate with samesign info...
Definition CmpPredicate.h:23
static LLVM_ABI std::optional< CmpPredicate > getMatching(CmpPredicate A, CmpPredicate B)
Compares two CmpPredicates taking samesign into account and returns the canonicalized CmpPredicate if...
CmpPredicate()
Default constructor.
Definition CmpPredicate.h:29
bool operator==(CmpPredicate) const =delete
There is no operator== defined on CmpPredicate.
static LLVM_ABI CmpPredicate get(const CmpInst *Cmp)
Do a ICmpInst::getCmpPredicate() or CmpInst::getPredicate(), as appropriate.
LLVM_ABI CmpInst::Predicate getPreferredSignedPredicate() const
Attempts to return a signed CmpInst::Predicate from the CmpPredicate.
bool operator==(CmpInst::Predicate P) const
An operator== on the underlying Predicate.
Definition CmpPredicate.h:68
CmpPredicate(CmpInst::Predicate Pred, bool HasSameSign=false)
Constructed implictly with a either Predicate and samesign information, or just a Predicate,...
Definition CmpPredicate.h:33
CmpInst::Predicate dropSameSign() const
Drops samesign information.
Definition CmpPredicate.h:47
bool operator!=(CmpPredicate) const =delete
bool hasSameSign() const
Query samesign information, for optimizations.
Definition CmpPredicate.h:43
bool operator!=(CmpInst::Predicate P) const
Definition CmpPredicate.h:69
static LLVM_ABI CmpPredicate getSwapped(CmpPredicate P)
Get the swapped predicate of a CmpPredicate.
This is an optimization pass for GlobalISel generic memory operations.