summaryrefslogtreecommitdiff
path: root/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
diff options
context:
space:
mode:
authorSergei Barannikov <barannikov88@gmail.com>2023-05-01 05:39:30 +0300
committerSergei Barannikov <barannikov88@gmail.com>2023-05-17 21:51:45 +0300
commit01a796744745d8413d0821c734caf2fbe19f2eca (patch)
treea48ea04230b38e6ea69d84fc537668f6eab4cc34 /llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
parentdc3069dadf6fd4eece82936fe913dc8310a24cd0 (diff)
downloadllvm-01a796744745d8413d0821c734caf2fbe19f2eca.tar.gz
[CodeGen] Replace CCState's getNextStackOffset with getStackSize (NFC)
The term "next stack offset" is misleading because the next argument is not necessarily allocated at this offset due to alignment constrains. It also does not make much sense when allocating arguments at negative offsets (introduced in a follow-up patch), because the returned offset would be past the end of the next argument. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D149566
Diffstat (limited to 'llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h')
-rw-r--r--llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h b/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
index e0a72a21f425..c8e198157b08 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h
@@ -188,7 +188,7 @@ public:
if (getAssignFn(State.isVarArg())(ValNo, ValVT, LocVT, LocInfo, Flags,
State))
return true;
- StackOffset = State.getNextStackOffset();
+ StackSize = State.getStackSize();
return false;
}
@@ -199,9 +199,8 @@ public:
/// as AssignFn on most targets.
CCAssignFn *AssignFnVarArg;
- /// Stack offset for next argument. At the end of argument evaluation, this
- /// is typically the total stack size.
- uint64_t StackOffset = 0;
+ /// The size of the currently allocated portion of the stack.
+ uint64_t StackSize = 0;
/// Select the appropriate assignment function depending on whether this is
/// a variadic call.