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 | a2608b581eac67e7e040162a32c507db18ee3b5b (patch) | |
tree | ff85c59c387238748f070342dde52bc5b77c107c /lib/CodeGen/SelectionDAG/CallingConvLower.cpp | |
parent | 54eb029c733ace4900e72d73db2179443eb0f958 (diff) | |
download | external_llvm-a2608b581eac67e7e040162a32c507db18ee3b5b.zip external_llvm-a2608b581eac67e7e040162a32c507db18ee3b5b.tar.gz external_llvm-a2608b581eac67e7e040162a32c507db18ee3b5b.tar.bz2 |
- Doh. Pass vector by value is bad.
- Add a AnalyzeCallResult specialized for calls which produce a single value. This is used by fastisel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/CallingConvLower.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/CallingConvLower.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp index 4788b15..5987e0c 100644 --- a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp +++ b/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(); + } +} |