[llvm-commits] [llvm] r153029 - /llvm/trunk/include/llvm/Support/InstVisitor.h
Chandler Carruth
chandlerc at gmail.com
Sun Mar 18 16:31:28 PDT 2012
Author: chandlerc
Date: Sun Mar 18 18:31:28 2012
New Revision: 153029
URL: http://llvm.org/viewvc/llvm-project?rev=153029&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/Support/InstVisitor.h
Modified: llvm/trunk/include/llvm/Support/InstVisitor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/InstVisitor.h?rev=153029&r1=153028&r2=153029&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/InstVisitor.h (original)
+++ llvm/trunk/include/llvm/Support/InstVisitor.h Sun Mar 18 18:31:28 2012
@@ -166,8 +166,8 @@
RetTy visitUnreachableInst(UnreachableInst &I) { DELEGATE(TerminatorInst);}
RetTy visitICmpInst(ICmpInst &I) { DELEGATE(CmpInst);}
RetTy visitFCmpInst(FCmpInst &I) { DELEGATE(CmpInst);}
- RetTy visitAllocaInst(AllocaInst &I) { DELEGATE(Instruction); }
- RetTy visitLoadInst(LoadInst &I) { DELEGATE(Instruction); }
+ RetTy visitAllocaInst(AllocaInst &I) { DELEGATE(UnaryInstruction); }
+ RetTy visitLoadInst(LoadInst &I) { DELEGATE(UnaryInstruction); }
RetTy visitStoreInst(StoreInst &I) { DELEGATE(Instruction); }
RetTy visitAtomicCmpXchgInst(AtomicCmpXchgInst &I){ DELEGATE(Instruction); }
RetTy visitAtomicRMWInst(AtomicRMWInst &I) { DELEGATE(Instruction); }
@@ -188,11 +188,11 @@
RetTy visitBitCastInst(BitCastInst &I) { DELEGATE(CastInst); }
RetTy visitSelectInst(SelectInst &I) { DELEGATE(Instruction); }
RetTy visitCallInst(CallInst &I) { DELEGATE(Instruction); }
- RetTy visitVAArgInst(VAArgInst &I) { DELEGATE(Instruction); }
+ RetTy visitVAArgInst(VAArgInst &I) { DELEGATE(UnaryInstruction); }
RetTy visitExtractElementInst(ExtractElementInst &I) { DELEGATE(Instruction);}
RetTy visitInsertElementInst(InsertElementInst &I) { DELEGATE(Instruction); }
RetTy visitShuffleVectorInst(ShuffleVectorInst &I) { DELEGATE(Instruction); }
- RetTy visitExtractValueInst(ExtractValueInst &I) { DELEGATE(Instruction);}
+ RetTy visitExtractValueInst(ExtractValueInst &I) { DELEGATE(UnaryInstruction);}
RetTy visitInsertValueInst(InsertValueInst &I) { DELEGATE(Instruction); }
RetTy visitLandingPadInst(LandingPadInst &I) { DELEGATE(Instruction); }
@@ -200,10 +200,11 @@
// instruction type, they can overload one of these to get the whole class
// of instructions...
//
- RetTy visitTerminatorInst(TerminatorInst &I) { DELEGATE(Instruction); }
- RetTy visitBinaryOperator(BinaryOperator &I) { DELEGATE(Instruction); }
- RetTy visitCmpInst(CmpInst &I) { DELEGATE(Instruction); }
- RetTy visitCastInst(CastInst &I) { DELEGATE(Instruction); }
+ RetTy visitCastInst(CastInst &I) { DELEGATE(UnaryInstruction); }
+ RetTy visitTerminatorInst(TerminatorInst &I) { DELEGATE(Instruction); }
+ RetTy visitUnaryInstruction(UnaryInstruction &I) { DELEGATE(Instruction); }
+ RetTy visitBinaryOperator(BinaryOperator &I) { DELEGATE(Instruction); }
+ RetTy visitCmpInst(CmpInst &I) { DELEGATE(Instruction); }
// If the user wants a 'default' case, they can choose to override this
// function. If this function is not overloaded in the user's subclass, then
More information about the llvm-commits
mailing list