diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2007-08-10 14:44:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2007-08-10 14:44:42 +0000 |
commit | 594d37e21aea4ef841d9ee5d9c328c4bf1c6bed7 (patch) | |
tree | 5f2d522f84dd3b83747f6182b98ba0fa17795c04 /include/llvm/CodeGen | |
parent | ae9671b838150c780c13e601574efa6641788f2b (diff) |
propagate struct size and alignment of byval arguments to the DAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/CallingConvLower.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/CallingConvLower.h b/include/llvm/CodeGen/CallingConvLower.h index 959d0528c6..9c776131b5 100644 --- a/include/llvm/CodeGen/CallingConvLower.h +++ b/include/llvm/CodeGen/CallingConvLower.h @@ -190,6 +190,10 @@ public: StackOffset += Size; return Result; } + + void HandleStruct(unsigned ValNo, MVT::ValueType ValVT, + MVT::ValueType LocVT, CCValAssign::LocInfo LocInfo, + unsigned ArgFlags); private: /// MarkAllocated - Mark a register and all of its aliases as allocated. void MarkAllocated(unsigned Reg); diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 3502e89501..b0278cbc5b 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -68,6 +68,10 @@ namespace ISD { ByValOffs = 4, Nest = 1<<5, ///< Parameter is nested function static chain NestOffs = 5, + ByValAlign = 0xF << 6, //< The alignment of the struct + ByValAlignOffs = 6, + ByValSize = 0x1ffff << 10, //< The size of the struct + ByValSizeOffs = 10, OrigAlignment = 0x1F<<27, OrigAlignmentOffs = 27 }; @@ -200,6 +204,10 @@ namespace ISD { /// Bit 0 - signness /// Bit 1 - 'inreg' attribute /// Bit 2 - 'sret' attribute + /// Bit 4 - 'byval' attribute + /// Bit 5 - 'nest' attribute + /// Bit 6-9 - alignment of byval structures + /// Bit 10-26 - size of byval structures /// Bits 31:27 - argument ABI alignment in the first argument piece and /// alignment '1' in other argument pieces. CALL, |