mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
- 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
This commit is contained in:
parent
e3e3626338
commit
c7fcfa07d9
@ -147,7 +147,7 @@ public:
|
||||
|
||||
/// AnalyzeCallOperands - Same as above except it takes vectors of types
|
||||
/// and argument flags.
|
||||
void AnalyzeCallOperands(SmallVectorImpl<MVT> ArgVTs,
|
||||
void AnalyzeCallOperands(SmallVectorImpl<MVT> &ArgVTs,
|
||||
SmallVectorImpl<ISD::ArgFlagsTy> &Flags,
|
||||
CCAssignFn Fn);
|
||||
|
||||
@ -155,6 +155,9 @@ public:
|
||||
/// incorporating info about the passed values into this state.
|
||||
void AnalyzeCallResult(SDNode *TheCall, CCAssignFn Fn);
|
||||
|
||||
/// AnalyzeCallResult - Same as above except it's specialized for calls which
|
||||
/// produce a single value.
|
||||
void AnalyzeCallResult(MVT VT, CCAssignFn Fn);
|
||||
|
||||
/// getFirstUnallocated - Return the first unallocated register in the set, or
|
||||
/// NumRegs if they are all allocated.
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user