[llvm-commits] CVS: llvm/include/llvm/Instructions.h

Chris Lattner lattner at cs.uiuc.edu
Thu May 5 22:49:48 PDT 2005



Changes in directory llvm/include/llvm:

Instructions.h updated: 1.17 -> 1.18
---
Log message:

Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.


---
Diffs of the changes:  (+5 -1)

 Instructions.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.17 llvm/include/llvm/Instructions.h:1.18
--- llvm/include/llvm/Instructions.h:1.17	Tue May  3 00:43:14 2005
+++ llvm/include/llvm/Instructions.h	Fri May  6 00:49:34 2005
@@ -467,7 +467,8 @@
 //===----------------------------------------------------------------------===//
 
 /// CallInst - This class represents a function call, abstracting a target
-/// machine's calling convention.
+/// machine's calling convention.  This class uses the SubClassData field to
+/// indicate whether or not this is a tail call.
 ///
 class CallInst : public Instruction {
   CallInst(const CallInst &CI);
@@ -501,6 +502,9 @@
   virtual CallInst *clone() const;
   bool mayWriteToMemory() const { return true; }
 
+  bool isTailCall() const           { return SubclassData; }
+  void setTailCall(bool isTailCall) { SubclassData = isTailCall; }
+
   /// getCalledFunction - Return the function being called by this instruction
   /// if it is a direct call.  If it is a call through a function pointer,
   /// return null.






More information about the llvm-commits mailing list