X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCodeGen%2FCallingConvLower.h;h=5e5bbcecc6b6f23ba5e3c336f2ef43ce5141cda2;hb=a727d5502c8e23c090da658bf14c5ebc1169a070;hp=72845c43f443695966e472a67f9e81643d27274b;hpb=13513b7a50f5b4497c276796e00ef9bae730d8e0;p=oota-llvm.git diff --git a/include/llvm/CodeGen/CallingConvLower.h b/include/llvm/CodeGen/CallingConvLower.h index 72845c43f44..5e5bbcecc6b 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,23 @@ public: bool isAllocated(unsigned Reg) const { return UsedRegs[Reg/32] & (1 << (Reg&31)); } + + /// AnalyzeFormalArguments - Analyze an ISD::FORMAL_ARGUMENTS node, + /// incorporating info about the formals into this state. + void AnalyzeFormalArguments(SDNode *TheArgs, CCAssignFn Fn); + + /// AnalyzeReturn - Analyze the returned values of an ISD::RET node, + /// incorporating info about the result values into this state. + void AnalyzeReturn(SDNode *TheRet, CCAssignFn Fn); + + /// AnalyzeCallOperands - Analyze an ISD::CALL node, incorporating info + /// about the passed values into this state. + void AnalyzeCallOperands(SDNode *TheCall, CCAssignFn Fn); + + /// AnalyzeCallResult - Analyze the return values of an ISD::CALL node, + /// incorporating info about the passed values into this state. + void AnalyzeCallResult(SDNode *TheCall, CCAssignFn Fn); + /// getFirstUnallocated - Return the first unallocated register in the set, or /// NumRegs if they are all allocated. @@ -168,6 +193,8 @@ private: void MarkAllocated(unsigned Reg); }; + + } // end namespace llvm #endif