From 099dbf6ec0bfad475c314521d3a5e67071a51418 Mon Sep 17 00:00:00 2001 From: Amara Emerson Date: Mon, 5 Aug 2019 23:05:28 +0000 Subject: [PATCH] [GlobalISel][CallLowering] Rename isArgumentHandler() -> isIncomingArgumentHandler() Previous name and comment incorrectly implied it was just for formal arg handlers, which is not true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367945 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/GlobalISel/CallLowering.h | 6 +++--- lib/CodeGen/GlobalISel/CallLowering.cpp | 4 ++-- lib/Target/AArch64/AArch64CallLowering.cpp | 2 +- lib/Target/AMDGPU/AMDGPUCallLowering.cpp | 2 +- lib/Target/ARM/ARMCallLowering.cpp | 2 +- lib/Target/X86/X86CallLowering.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/llvm/CodeGen/GlobalISel/CallLowering.h b/include/llvm/CodeGen/GlobalISel/CallLowering.h index b5e23c31d36..4e9f65841f1 100644 --- a/include/llvm/CodeGen/GlobalISel/CallLowering.h +++ b/include/llvm/CodeGen/GlobalISel/CallLowering.h @@ -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 diff --git a/lib/CodeGen/GlobalISel/CallLowering.cpp b/lib/CodeGen/GlobalISel/CallLowering.cpp index 17c6b84e48a..2461923d2ed 100644 --- a/lib/CodeGen/GlobalISel/CallLowering.cpp +++ b/lib/CodeGen/GlobalISel/CallLowering.cpp @@ -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); diff --git a/lib/Target/AArch64/AArch64CallLowering.cpp b/lib/Target/AArch64/AArch64CallLowering.cpp index c7434e5a2e4..31b5e8a1d23 100644 --- a/lib/Target/AArch64/AArch64CallLowering.cpp +++ b/lib/Target/AArch64/AArch64CallLowering.cpp @@ -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; }; diff --git a/lib/Target/AMDGPU/AMDGPUCallLowering.cpp b/lib/Target/AMDGPU/AMDGPUCallLowering.cpp index 905443fffd7..6b194b1c61b 100644 --- a/lib/Target/AMDGPU/AMDGPUCallLowering.cpp +++ b/lib/Target/AMDGPU/AMDGPUCallLowering.cpp @@ -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 { diff --git a/lib/Target/ARM/ARMCallLowering.cpp b/lib/Target/ARM/ARMCallLowering.cpp index 00f21a916c6..a507756b96d 100644 --- a/lib/Target/ARM/ARMCallLowering.cpp +++ b/lib/Target/ARM/ARMCallLowering.cpp @@ -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 { diff --git a/lib/Target/X86/X86CallLowering.cpp b/lib/Target/X86/X86CallLowering.cpp index e4079d6e415..89b3603292f 100644 --- a/lib/Target/X86/X86CallLowering.cpp +++ b/lib/Target/X86/X86CallLowering.cpp @@ -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 { -- 2.40.0