diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2002-11-22 11:07:01 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2002-11-22 11:07:01 +0000 |
commit | fa8d571bd47111187c665b38619e413c871f4edb (patch) | |
tree | 316c1af50a83f3737b9dc54e0bed901808e475d9 /lib | |
parent | 69a09e5677921241a61e10195837d8155dd253f0 (diff) | |
download | external_llvm-fa8d571bd47111187c665b38619e413c871f4edb.zip external_llvm-fa8d571bd47111187c665b38619e413c871f4edb.tar.gz external_llvm-fa8d571bd47111187c665b38619e413c871f4edb.tar.bz2 |
lib/Target/X86/InstSelectSimple.cpp: Add visitCallInst, visitCastInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 14 | ||||
-rw-r--r-- | lib/Target/X86/X86ISelSimple.cpp | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index 3f7a256..e5c5535 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -63,8 +63,11 @@ namespace { // Visitation methods for various instructions. These methods simply emit // fixed X86 code for each instruction. // + + // Control flow operators void visitReturnInst(ReturnInst &RI); void visitBranchInst(BranchInst &BI); + void visitCallInst(CallInst &I); // Arithmetic operators void visitSimpleBinary(BinaryOperator &B, unsigned OpcodeClass); @@ -97,6 +100,7 @@ namespace { // Other operators void visitShiftInst(ShiftInst &I); void visitPHINode(PHINode &I); + void visitCastInst(CastInst &I); void visitInstruction(Instruction &I) { std::cerr << "Cannot instruction select: " << I; @@ -359,6 +363,11 @@ ISel::visitBranchInst (BranchInst & BI) } } +void +ISel::visitCallInst (CallInst &CI) +{ + visitInstruction (CI); +} /// visitSimpleBinary - Implement simple binary operators for integral types... /// OperatorClass is one of: 0 for Add, 1 for Sub, 2 for And, 3 for Or, @@ -572,6 +581,11 @@ void ISel::visitPHINode(PHINode &PN) { } } +void +ISel::visitCastInst (CastInst &CI) +{ + visitInstruction (CI); +} /// createSimpleX86InstructionSelector - This pass converts an LLVM function /// into a machine code representation is a very simple peep-hole fashion. The diff --git a/lib/Target/X86/X86ISelSimple.cpp b/lib/Target/X86/X86ISelSimple.cpp index 3f7a256..e5c5535 100644 --- a/lib/Target/X86/X86ISelSimple.cpp +++ b/lib/Target/X86/X86ISelSimple.cpp @@ -63,8 +63,11 @@ namespace { // Visitation methods for various instructions. These methods simply emit // fixed X86 code for each instruction. // + + // Control flow operators void visitReturnInst(ReturnInst &RI); void visitBranchInst(BranchInst &BI); + void visitCallInst(CallInst &I); // Arithmetic operators void visitSimpleBinary(BinaryOperator &B, unsigned OpcodeClass); @@ -97,6 +100,7 @@ namespace { // Other operators void visitShiftInst(ShiftInst &I); void visitPHINode(PHINode &I); + void visitCastInst(CastInst &I); void visitInstruction(Instruction &I) { std::cerr << "Cannot instruction select: " << I; @@ -359,6 +363,11 @@ ISel::visitBranchInst (BranchInst & BI) } } +void +ISel::visitCallInst (CallInst &CI) +{ + visitInstruction (CI); +} /// visitSimpleBinary - Implement simple binary operators for integral types... /// OperatorClass is one of: 0 for Add, 1 for Sub, 2 for And, 3 for Or, @@ -572,6 +581,11 @@ void ISel::visitPHINode(PHINode &PN) { } } +void +ISel::visitCastInst (CastInst &CI) +{ + visitInstruction (CI); +} /// createSimpleX86InstructionSelector - This pass converts an LLVM function /// into a machine code representation is a very simple peep-hole fashion. The |