LLVM: include/llvm/Analysis/SimplifyQuery.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_ANALYSIS_SIMPLIFYQUERY_H
10#define LLVM_ANALYSIS_SIMPLIFYQUERY_H
11
14
15namespace llvm {
16
17class AssumptionCache;
18class DomConditionCache;
19class DominatorTree;
20class TargetLibraryInfo;
21
22
23
24
29
32 return I->getMetadata(KindID);
33 return nullptr;
34 }
35
38 return Op->hasNoUnsignedWrap();
39 return false;
40 }
41
44 return Op->hasNoSignedWrap();
45 return false;
46 }
47
50 return cast(Op)->isExact();
51 return false;
52 }
53
56 return Op->hasNoSignedZeros();
57 return false;
58 }
59};
60
61
66
68};
69
78
79
80
81
83
84
85
86
88
91
95 const Instruction *CXTI = nullptr, bool UseInstrInfo = true,
99
102 const Instruction *CXTI = nullptr, bool UseInstrInfo = true,
106
109 Copy.CxtI = I;
110 return Copy;
111 }
114 Copy.CanUseUndef = false;
115 return Copy;
116 }
117
118
119
121
124 Copy.DC = nullptr;
125 return Copy;
126 }
127
130 Copy.CC = &CC;
131 return Copy;
132 }
133
136 Copy.CC = nullptr;
137 return Copy;
138 }
139};
140
141}
142
143#endif
This file defines the SmallPtrSet class.
A cache of @llvm.assume calls within a function.
This class represents an Operation in the Expression.
A parsed version of the target data layout string in and methods for querying it.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Provides information about what library functions are available for the current target.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
Evaluate query assuming this condition holds.
SmallPtrSet< Value *, 4 > AffectedValues
InstrInfoQuery provides an interface to query additional information for instructions like metadata o...
bool isExact(const BinaryOperator *Op) const
MDNode * getMetadata(const Instruction *I, unsigned KindID) const
bool hasNoSignedZeros(const InstT *Op) const
bool hasNoSignedWrap(const InstT *Op) const
bool hasNoUnsignedWrap(const InstT *Op) const
SimplifyQuery getWithoutCondContext() const
SimplifyQuery(const DataLayout &DL, const Instruction *CXTI=nullptr)
bool CanUseUndef
Controls whether simplifications are allowed to constrain the range of possible values for uses of un...
SimplifyQuery getWithCondContext(const CondContext &CC) const
SimplifyQuery getWithInstruction(const Instruction *I) const
SimplifyQuery(const DataLayout &DL, const TargetLibraryInfo *TLI, const DominatorTree *DT=nullptr, AssumptionCache *AC=nullptr, const Instruction *CXTI=nullptr, bool UseInstrInfo=true, bool CanUseUndef=true, const DomConditionCache *DC=nullptr)
bool isUndefValue(Value *V) const
If CanUseUndef is true, returns whether V is undef.
const DomConditionCache * DC
SimplifyQuery(const DataLayout &DL, const DominatorTree *DT, AssumptionCache *AC=nullptr, const Instruction *CXTI=nullptr, bool UseInstrInfo=true, bool CanUseUndef=true)
const TargetLibraryInfo * TLI
SimplifyQuery getWithoutUndef() const
SimplifyQuery getWithoutDomCondCache() const