mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add versions of OutputArgReg, AnalyzeReturn, and AnalyzeCallOperands
which do not depend on SelectionDAG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -111,6 +111,22 @@ void CCState::AnalyzeReturn(const SmallVectorImpl<ISD::OutputArg> &Outs,
|
||||
}
|
||||
}
|
||||
|
||||
void CCState::AnalyzeReturn(const SmallVectorImpl<ISD::OutputArgReg> &Outs,
|
||||
CCAssignFn Fn) {
|
||||
// Determine which register each value should be copied into.
|
||||
for (unsigned i = 0, e = Outs.size(); i != e; ++i) {
|
||||
EVT VT = Outs[i].VT;
|
||||
ISD::ArgFlagsTy ArgFlags = Outs[i].Flags;
|
||||
if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this)) {
|
||||
#ifndef NDEBUG
|
||||
dbgs() << "Return operand #" << i << " has unhandled type "
|
||||
<< VT.getEVTString();
|
||||
#endif
|
||||
llvm_unreachable(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// AnalyzeCallOperands - Analyze the outgoing arguments to a call,
|
||||
/// incorporating info about the passed values into this state.
|
||||
@@ -130,6 +146,25 @@ void CCState::AnalyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> &Outs,
|
||||
}
|
||||
}
|
||||
|
||||
/// AnalyzeCallOperands - Analyze the outgoing arguments to a call,
|
||||
/// incorporating info about the passed values into this state.
|
||||
void
|
||||
CCState::AnalyzeCallOperands(const SmallVectorImpl<ISD::OutputArgReg> &Outs,
|
||||
CCAssignFn Fn) {
|
||||
unsigned NumOps = Outs.size();
|
||||
for (unsigned i = 0; i != NumOps; ++i) {
|
||||
EVT ArgVT = Outs[i].VT;
|
||||
ISD::ArgFlagsTy ArgFlags = Outs[i].Flags;
|
||||
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
|
||||
#ifndef NDEBUG
|
||||
dbgs() << "Call operand #" << i << " has unhandled type "
|
||||
<< ArgVT.getEVTString();
|
||||
#endif
|
||||
llvm_unreachable(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// AnalyzeCallOperands - Same as above except it takes vectors of types
|
||||
/// and argument flags.
|
||||
void CCState::AnalyzeCallOperands(SmallVectorImpl<EVT> &ArgVTs,
|
||||
|
Reference in New Issue
Block a user