diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-07 09:02:18 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-07 09:02:18 +0000 |
commit | 615739b9912c7969b1849f7d101311fe4532847f (patch) | |
tree | dcdc2ad6d04d0ada8486feb2d6b200a8d87fc722 /llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp | |
parent | 105c5811351a26be54ac84b2847d2a41e2e9caaf (diff) | |
download | bcm5719-llvm-615739b9912c7969b1849f7d101311fe4532847f.tar.gz bcm5719-llvm-615739b9912c7969b1849f7d101311fe4532847f.zip |
- Doh. Pass vector by value is bad.
- Add a AnalyzeCallResult specialized for calls which produce a single value. This is used by fastisel.
llvm-svn: 55879
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp index 4788b15d959..5987e0cdd5b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp @@ -107,7 +107,7 @@ void CCState::AnalyzeCallOperands(SDNode *TheCall, CCAssignFn Fn) { /// AnalyzeCallOperands - Same as above except it takes vectors of types /// and argument flags. -void CCState::AnalyzeCallOperands(SmallVectorImpl<MVT> ArgVTs, +void CCState::AnalyzeCallOperands(SmallVectorImpl<MVT> &ArgVTs, SmallVectorImpl<ISD::ArgFlagsTy> &Flags, CCAssignFn Fn) { unsigned NumOps = ArgVTs.size(); @@ -134,3 +134,13 @@ void CCState::AnalyzeCallResult(SDNode *TheCall, CCAssignFn Fn) { } } } + +/// AnalyzeCallResult - Same as above except it's specialized for calls which +/// produce a single value. +void CCState::AnalyzeCallResult(MVT VT, CCAssignFn Fn) { + if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) { + cerr << "Call result has unhandled type " + << VT.getMVTString() << "\n"; + abort(); + } +} |