llvm.org GIT mirror llvm / 080b862
Teach InstVisitor about the UnaryInstruction layer in the instruction type hierarchy. I wanted to use this for the inline cost rewrite, and found it was missing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153029 91177308-0d34-0410-b5e6-96231b3b80d8 Chandler Carruth 8 years ago
1 changed file(s) with 9 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
165165 RetTy visitUnreachableInst(UnreachableInst &I) { DELEGATE(TerminatorInst);}
166166 RetTy visitICmpInst(ICmpInst &I) { DELEGATE(CmpInst);}
167167 RetTy visitFCmpInst(FCmpInst &I) { DELEGATE(CmpInst);}
168 RetTy visitAllocaInst(AllocaInst &I) { DELEGATE(Instruction); }
169 RetTy visitLoadInst(LoadInst &I) { DELEGATE(Instruction); }
168 RetTy visitAllocaInst(AllocaInst &I) { DELEGATE(UnaryInstruction); }
169 RetTy visitLoadInst(LoadInst &I) { DELEGATE(UnaryInstruction); }
170170 RetTy visitStoreInst(StoreInst &I) { DELEGATE(Instruction); }
171171 RetTy visitAtomicCmpXchgInst(AtomicCmpXchgInst &I){ DELEGATE(Instruction); }
172172 RetTy visitAtomicRMWInst(AtomicRMWInst &I) { DELEGATE(Instruction); }
187187 RetTy visitBitCastInst(BitCastInst &I) { DELEGATE(CastInst); }
188188 RetTy visitSelectInst(SelectInst &I) { DELEGATE(Instruction); }
189189 RetTy visitCallInst(CallInst &I) { DELEGATE(Instruction); }
190 RetTy visitVAArgInst(VAArgInst &I) { DELEGATE(Instruction); }
190 RetTy visitVAArgInst(VAArgInst &I) { DELEGATE(UnaryInstruction); }
191191 RetTy visitExtractElementInst(ExtractElementInst &I) { DELEGATE(Instruction);}
192192 RetTy visitInsertElementInst(InsertElementInst &I) { DELEGATE(Instruction); }
193193 RetTy visitShuffleVectorInst(ShuffleVectorInst &I) { DELEGATE(Instruction); }
194 RetTy visitExtractValueInst(ExtractValueInst &I) { DELEGATE(Instruction);}
194 RetTy visitExtractValueInst(ExtractValueInst &I) { DELEGATE(UnaryInstruction);}
195195 RetTy visitInsertValueInst(InsertValueInst &I) { DELEGATE(Instruction); }
196196 RetTy visitLandingPadInst(LandingPadInst &I) { DELEGATE(Instruction); }
197197
199199 // instruction type, they can overload one of these to get the whole class
200200 // of instructions...
201201 //
202 RetTy visitTerminatorInst(TerminatorInst &I) { DELEGATE(Instruction); }
203 RetTy visitBinaryOperator(BinaryOperator &I) { DELEGATE(Instruction); }
204 RetTy visitCmpInst(CmpInst &I) { DELEGATE(Instruction); }
205 RetTy visitCastInst(CastInst &I) { DELEGATE(Instruction); }
202 RetTy visitCastInst(CastInst &I) { DELEGATE(UnaryInstruction); }
203 RetTy visitTerminatorInst(TerminatorInst &I) { DELEGATE(Instruction); }
204 RetTy visitUnaryInstruction(UnaryInstruction &I) { DELEGATE(Instruction); }
205 RetTy visitBinaryOperator(BinaryOperator &I) { DELEGATE(Instruction); }
206 RetTy visitCmpInst(CmpInst &I) { DELEGATE(Instruction); }
206207
207208 // If the user wants a 'default' case, they can choose to override this
208209 // function. If this function is not overloaded in the user's subclass, then