1919#define DEBUG_TYPE " dxil-legalize"
2020
2121using namespace llvm ;
22- namespace {
2322
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) {
2626
2727 auto *Cmp = dyn_cast<CmpInst>(&I);
2828
@@ -89,9 +89,10 @@ void fixI8TruncUseChain(Instruction &I, SmallVector<Instruction *> &ToRemove,
8989 }
9090}
9191
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 *> &) {
9596
9697 if (auto *Extract = dyn_cast<ExtractElementInst>(&I)) {
9798 Value *Idx = Extract->getIndexOperand ();
@@ -127,6 +128,7 @@ void downcastI64toI32InsertExtractElements(Instruction &I,
127128 }
128129}
129130
131+ namespace {
130132class DXILLegalizationPipeline {
131133
132134public:
@@ -147,8 +149,9 @@ class DXILLegalizationPipeline {
147149 }
148150
149151private:
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 *> &)>>
152155 LegalizationPipeline;
153156
154157 void initializeLegalizationPipeline () {
0 commit comments