[llvm-commits] CVS: llvm/include/llvm/CodeGen/CallingConvLower.h

Chris Lattner sabre at nondot.org
Tue Feb 27 22:56:54 PST 2007



Changes in directory llvm/include/llvm/CodeGen:

CallingConvLower.h updated: 1.2 -> 1.3
---
Log message:

add methods to analyze calls and formals.


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

 CallingConvLower.h |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/CallingConvLower.h
diff -u llvm/include/llvm/CodeGen/CallingConvLower.h:1.2 llvm/include/llvm/CodeGen/CallingConvLower.h:1.3
--- llvm/include/llvm/CodeGen/CallingConvLower.h:1.2	Mon Feb 26 23:13:54 2007
+++ llvm/include/llvm/CodeGen/CallingConvLower.h	Wed Feb 28 00:56:37 2007
@@ -21,7 +21,9 @@
 namespace llvm {
   class MRegisterInfo;
   class TargetMachine;
-  
+  class CCState;
+  class SDNode;
+
 /// CCValAssign - Represent assignment of one arg/retval to a location.
 class CCValAssign {
 public:
@@ -91,6 +93,12 @@
 };
 
 
+/// CCAssignFn - This function assigns a location for Val, updating State to
+/// reflect the change.
+typedef bool CCAssignFn(unsigned ValNo, MVT::ValueType ValVT,
+                        MVT::ValueType LocVT, CCValAssign::LocInfo LocInfo,
+                        unsigned ArgFlags, CCState &State);
+
   
 /// CCState - This class holds information needed while lowering arguments and
 /// return values.  It captures which registers are already assigned and which
@@ -121,6 +129,15 @@
   bool isAllocated(unsigned Reg) const {
     return UsedRegs[Reg/32] & (1 << (Reg&31));
   }
+  
+  /// AnalyzeCallOperands - Analyze an ISD::CALL node, incorporating info
+  /// about the passed values into this state.
+  void AnalyzeCallOperands(SDNode *TheCall, CCAssignFn Fn);
+
+  /// AnalyzeFormalArguments - Analyze an ISD::FORMAL_ARGUMENTS node,
+  /// incorporating info about the formals into this state.
+  void AnalyzeFormalArguments(SDNode *TheArgs, CCAssignFn Fn);
+  
 
   /// getFirstUnallocated - Return the first unallocated register in the set, or
   /// NumRegs if they are all allocated.
@@ -168,6 +185,8 @@
   void MarkAllocated(unsigned Reg);
 };
 
+
+
 } // end namespace llvm
 
 #endif






More information about the llvm-commits mailing list