[GlobalISel][CallLowering] Rename isArgumentHandler() -> isIncomingArgumentHandler()
Previous name and comment incorrectly implied it was just for formal arg handlers, which is not true. llvm-svn: 367945
This commit is contained in:
parent
1647758882
commit
bc1172df14
@ -72,9 +72,9 @@ public:
|
||||
|
||||
virtual ~ValueHandler() = default;
|
||||
|
||||
/// Returns true if the handler is dealing with formal arguments,
|
||||
/// not with return values etc.
|
||||
virtual bool isArgumentHandler() const { return false; }
|
||||
/// Returns true if the handler is dealing with incoming arguments,
|
||||
/// i.e. those that move values from some physical location to vregs.
|
||||
virtual bool isIncomingArgumentHandler() const { return false; }
|
||||
|
||||
/// Materialize a VReg containing the address of the specified
|
||||
/// stack-based object. This is either based on a FrameIndex or
|
||||
|
||||
@ -183,7 +183,7 @@ bool CallLowering::handleAssignments(CCState &CCInfo,
|
||||
MVT CurVT = MVT::getVT(Args[i].Ty);
|
||||
if (Handler.assignArg(i, CurVT, CurVT, CCValAssign::Full, Args[i], CCInfo)) {
|
||||
// Try to use the register type if we couldn't assign the VT.
|
||||
if (!Handler.isArgumentHandler() || !CurVT.isValid())
|
||||
if (!Handler.isIncomingArgumentHandler() || !CurVT.isValid())
|
||||
return false;
|
||||
CurVT = TLI->getRegisterTypeForCallingConv(
|
||||
F.getContext(), F.getCallingConv(), EVT(CurVT));
|
||||
@ -212,7 +212,7 @@ bool CallLowering::handleAssignments(CCState &CCInfo,
|
||||
if (VA.isRegLoc()) {
|
||||
MVT OrigVT = MVT::getVT(Args[i].Ty);
|
||||
MVT VAVT = VA.getValVT();
|
||||
if (Handler.isArgumentHandler() && VAVT != OrigVT) {
|
||||
if (Handler.isIncomingArgumentHandler() && VAVT != OrigVT) {
|
||||
if (VAVT.getSizeInBits() < OrigVT.getSizeInBits())
|
||||
return false; // Can't handle this type of arg yet.
|
||||
const LLT VATy(VAVT);
|
||||
|
||||
@ -99,7 +99,7 @@ struct IncomingArgHandler : public CallLowering::ValueHandler {
|
||||
/// (it's an implicit-def of the BL).
|
||||
virtual void markPhysRegUsed(unsigned PhysReg) = 0;
|
||||
|
||||
bool isArgumentHandler() const override { return true; }
|
||||
bool isIncomingArgumentHandler() const override { return true; }
|
||||
|
||||
uint64_t StackUsed;
|
||||
};
|
||||
|
||||
@ -128,7 +128,7 @@ struct IncomingArgHandler : public CallLowering::ValueHandler {
|
||||
virtual void markPhysRegUsed(unsigned PhysReg) = 0;
|
||||
|
||||
// FIXME: What is the point of this being a callback?
|
||||
bool isArgumentHandler() const override { return true; }
|
||||
bool isIncomingArgumentHandler() const override { return true; }
|
||||
};
|
||||
|
||||
struct FormalArgHandler : public IncomingArgHandler {
|
||||
|
||||
@ -286,7 +286,7 @@ struct IncomingValueHandler : public CallLowering::ValueHandler {
|
||||
CCAssignFn AssignFn)
|
||||
: ValueHandler(MIRBuilder, MRI, AssignFn) {}
|
||||
|
||||
bool isArgumentHandler() const override { return true; }
|
||||
bool isIncomingArgumentHandler() const override { return true; }
|
||||
|
||||
Register getStackAddress(uint64_t Size, int64_t Offset,
|
||||
MachinePointerInfo &MPO) override {
|
||||
|
||||
@ -229,7 +229,7 @@ struct IncomingValueHandler : public CallLowering::ValueHandler {
|
||||
: ValueHandler(MIRBuilder, MRI, AssignFn),
|
||||
DL(MIRBuilder.getMF().getDataLayout()) {}
|
||||
|
||||
bool isArgumentHandler() const override { return true; }
|
||||
bool isIncomingArgumentHandler() const override { return true; }
|
||||
|
||||
Register getStackAddress(uint64_t Size, int64_t Offset,
|
||||
MachinePointerInfo &MPO) override {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user