LLVM: lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_LIB_TRANSFORMS_AGGRESSIVEINSTCOMBINE_COMBINEINTERNAL_H
16#define LLVM_LIB_TRANSFORMS_AGGRESSIVEINSTCOMBINE_COMBINEINTERNAL_H
17
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41namespace llvm {
51
57
58
60
61
62 TruncInst *CurrentTruncInst = nullptr;
63
64
65 struct Info {
66
67 unsigned ValidBitWidth = 0;
68
69 unsigned MinBitWidth = 0;
70
71 Value *NewValue = nullptr;
72 };
73
74
75
76
78
79public:
82 : AC(AC), TLI(TLI), DL(DL), DT(DT) {}
83
84
86
87private:
88
89
90
91
92 bool buildTruncExpressionGraph();
93
94
95
96
97
98
99 unsigned getMinBitWidth();
100
101
102
103
104
105
106
107 Type *getBestTruncatedType();
108
112 &DT);
113 }
114
118 }
119
120
121
122
123
124
125
127
128
129
130
131
132
133 void ReduceExpressionGraph(Type *SclTy);
134};
135}
136
137#endif
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file implements a map that provides insertion order iteration.
This file defines the SmallVector class.
static unsigned ComputeNumSignBits(const Value *V, const APInt &DemandedElts, const SimplifyQuery &Q, unsigned Depth)
A cache of @llvm.assume calls within a function.
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.
This class implements a map that also provides access to all stored values in a deterministic order.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Provides information about what library functions are available for the current target.
TruncInstCombine(AssumptionCache &AC, TargetLibraryInfo &TLI, const DataLayout &DL, const DominatorTree &DT)
Definition AggressiveInstCombineInternal.h:80
bool run(Function &F)
Perform TruncInst pattern optimization on given function.
This class represents a truncation of integer types.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr Value
LLVM_ABI void computeKnownBits(const Value *V, KnownBits &Known, const DataLayout &DL, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true, unsigned Depth=0)
Determine which bits of V are known to be either zero or one and return them in the KnownZero/KnownOn...
LLVM_ABI unsigned ComputeNumSignBits(const Value *Op, const DataLayout &DL, AssumptionCache *AC=nullptr, const Instruction *CxtI=nullptr, const DominatorTree *DT=nullptr, bool UseInstrInfo=true, unsigned Depth=0)
Return the number of times the sign bit of the register is replicated into the other bits.
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.