summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/CallingConvLower.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-28 06:56:37 +0000
committerChris Lattner <sabre@nondot.org>2007-02-28 06:56:37 +0000
commitfb39f99fa4cdeab24c1b462cdd954a7d792323b7 (patch)
tree4439dbf586a50a50242909e113b23062ae732fcf /include/llvm/CodeGen/CallingConvLower.h
parente5876ce21a23aeef913b25ffc09ad3829e6ade1e (diff)
downloadllvm-fb39f99fa4cdeab24c1b462cdd954a7d792323b7.tar.gz
llvm-fb39f99fa4cdeab24c1b462cdd954a7d792323b7.tar.bz2
llvm-fb39f99fa4cdeab24c1b462cdd954a7d792323b7.tar.xz
add methods to analyze calls and formals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/CallingConvLower.h')
-rw-r--r--include/llvm/CodeGen/CallingConvLower.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/CallingConvLower.h b/include/llvm/CodeGen/CallingConvLower.h
index 72845c43f4..715fa520de 100644
--- a/include/llvm/CodeGen/CallingConvLower.h
+++ b/include/llvm/CodeGen/CallingConvLower.h
@@ -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 @@ public:
};
+/// 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 @@ public:
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 @@ private:
void MarkAllocated(unsigned Reg);
};
+
+
} // end namespace llvm
#endif