19
19
#define DEBUG_TYPE " dxil-legalize"
20
20
21
21
using namespace llvm ;
22
- namespace {
23
22
24
- void fixI8TruncUseChain (Instruction &I, SmallVector<Instruction *> &ToRemove,
25
- DenseMap<Value *, Value *> &ReplacedValues) {
23
+ static void fixI8TruncUseChain (Instruction &I,
24
+ SmallVectorImpl<Instruction *> &ToRemove,
25
+ DenseMap<Value *, Value *> &ReplacedValues) {
26
26
27
27
auto *Cmp = dyn_cast<CmpInst>(&I);
28
28
@@ -89,9 +89,10 @@ void fixI8TruncUseChain(Instruction &I, SmallVector<Instruction *> &ToRemove,
89
89
}
90
90
}
91
91
92
- void downcastI64toI32InsertExtractElements (Instruction &I,
93
- SmallVector<Instruction *> &ToRemove,
94
- DenseMap<Value *, Value *> &) {
92
+ static void
93
+ downcastI64toI32InsertExtractElements (Instruction &I,
94
+ SmallVectorImpl<Instruction *> &ToRemove,
95
+ DenseMap<Value *, Value *> &) {
95
96
96
97
if (auto *Extract = dyn_cast<ExtractElementInst>(&I)) {
97
98
Value *Idx = Extract->getIndexOperand ();
@@ -127,6 +128,7 @@ void downcastI64toI32InsertExtractElements(Instruction &I,
127
128
}
128
129
}
129
130
131
+ namespace {
130
132
class DXILLegalizationPipeline {
131
133
132
134
public:
@@ -147,8 +149,9 @@ class DXILLegalizationPipeline {
147
149
}
148
150
149
151
private:
150
- SmallVector<std::function<void (Instruction &, SmallVector<Instruction *> &,
151
- DenseMap<Value *, Value *> &)>>
152
+ SmallVector<
153
+ std::function<void (Instruction &, SmallVectorImpl<Instruction *> &,
154
+ DenseMap<Value *, Value *> &)>>
152
155
LegalizationPipeline;
153
156
154
157
void initializeLegalizationPipeline () {
0 commit comments