mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-05 03:36:43 +00:00
GlobalISel: Add overload of handleAssignments with CCState
AMDGPU needs to allocate special argument registers separately from the user function argument list, so needs direct control over the CCState. The ArgLocs argument is only really necessary because CCState doesn't allow access to it. llvm-svn: 366279
This commit is contained in:
parent
cb1d8b47ab
commit
6001c775f3
@ -27,6 +27,7 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class CCState;
|
||||
class DataLayout;
|
||||
class Function;
|
||||
class MachineIRBuilder;
|
||||
@ -163,7 +164,10 @@ protected:
|
||||
/// \return True if everything has succeeded, false otherwise.
|
||||
bool handleAssignments(MachineIRBuilder &MIRBuilder, ArrayRef<ArgInfo> Args,
|
||||
ValueHandler &Handler) const;
|
||||
|
||||
bool handleAssignments(CCState &CCState,
|
||||
SmallVectorImpl<CCValAssign> &ArgLocs,
|
||||
MachineIRBuilder &MIRBuilder, ArrayRef<ArgInfo> Args,
|
||||
ValueHandler &Handler) const;
|
||||
public:
|
||||
CallLowering(const TargetLowering *TLI) : TLI(TLI) {}
|
||||
virtual ~CallLowering() = default;
|
||||
|
@ -163,10 +163,19 @@ bool CallLowering::handleAssignments(MachineIRBuilder &MIRBuilder,
|
||||
ValueHandler &Handler) const {
|
||||
MachineFunction &MF = MIRBuilder.getMF();
|
||||
const Function &F = MF.getFunction();
|
||||
const DataLayout &DL = F.getParent()->getDataLayout();
|
||||
|
||||
SmallVector<CCValAssign, 16> ArgLocs;
|
||||
CCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext());
|
||||
return handleAssignments(CCInfo, ArgLocs, MIRBuilder, Args, Handler);
|
||||
}
|
||||
|
||||
bool CallLowering::handleAssignments(CCState &CCInfo,
|
||||
SmallVectorImpl<CCValAssign> &ArgLocs,
|
||||
MachineIRBuilder &MIRBuilder,
|
||||
ArrayRef<ArgInfo> Args,
|
||||
ValueHandler &Handler) const {
|
||||
MachineFunction &MF = MIRBuilder.getMF();
|
||||
const Function &F = MF.getFunction();
|
||||
const DataLayout &DL = F.getParent()->getDataLayout();
|
||||
|
||||
unsigned NumArgs = Args.size();
|
||||
for (unsigned i = 0; i != NumArgs; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user