diff options
author | Chris Lattner <sabre@nondot.org> | 2005-05-06 06:13:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-05-06 06:13:34 +0000 |
commit | 38287bdfde17249ed4725aa906ec15c59ccfe610 (patch) | |
tree | 0213f0def51f9a2c49ebad81fef0dfa774abbd1a /lib/Bytecode/Writer/Writer.cpp | |
parent | 653488d1660c2d43ca7efc3f2a81c83d903d1e7f (diff) |
add bytecode reader support for tail calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index f6d09c8220..5f614fddf0 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -606,7 +606,10 @@ void BytecodeWriter::outputInstruction(const Instruction &I) { unsigned Opcode = I.getOpcode(); unsigned NumOperands = I.getNumOperands(); - // Encode 'volatile load' as 62 and 'volatile store' as 63. + // Encode 'tail call' as 61, 'volatile load' as 62, and 'volatile store' as + // 63. + if (isa<CallInst>(I) && cast<CallInst>(I).isTailCall()) + Opcode = 61; if (isa<LoadInst>(I) && cast<LoadInst>(I).isVolatile()) Opcode = 62; if (isa<StoreInst>(I) && cast<StoreInst>(I).isVolatile()) |