[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 5 23:13:48 PDT 2005
Changes in directory llvm/lib/Bytecode/Writer:
Writer.cpp updated: 1.99 -> 1.100
---
Log message:
add bytecode reader support for tail calls
---
Diffs of the changes: (+4 -1)
Writer.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.99 llvm/lib/Bytecode/Writer/Writer.cpp:1.100
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.99 Thu May 5 17:32:23 2005
+++ llvm/lib/Bytecode/Writer/Writer.cpp Fri May 6 01:13:34 2005
@@ -606,7 +606,10 @@
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())
More information about the llvm-commits
mailing list