diff options
author | bzEq <lkail@cn.ibm.com> | 2023-09-08 15:16:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 15:16:00 +0800 |
commit | d9efcb54c9d4a3068f95b826481ebbee44d236b4 (patch) | |
tree | d8d45155d94bca586ba0f3f0182265597a5161b3 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 785e5737c61c31cab401c653e6804e51b76b03c8 (diff) | |
download | llvm-d9efcb54c9d4a3068f95b826481ebbee44d236b4.zip llvm-d9efcb54c9d4a3068f95b826481ebbee44d236b4.tar.gz llvm-d9efcb54c9d4a3068f95b826481ebbee44d236b4.tar.bz2 |
[PEI][PowerPC] Fix false alarm of stack size limit (#65559)
PPC64 allows stack size up to ((2^63)-1) bytes. Currently llc reports
```
warning: stack frame size (4294967568) exceeds limit (4294967295) in function 'main'
```
if the stack allocated is larger than 4G.
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index fe88a36..6c8be5c 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -293,7 +293,7 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) { MachineFrameInfo &MFI = MF.getFrameInfo(); uint64_t StackSize = MFI.getStackSize(); - unsigned Threshold = UINT_MAX; + uint64_t Threshold = TFI->getStackThreshold(); if (MF.getFunction().hasFnAttribute("warn-stack-size")) { bool Failed = MF.getFunction() .getFnAttribute("warn-stack-size") |