[llvm] 0a58ef5 - [Hexagon] Require PS_aligna whenever variable-sized objects are present
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 07:46:10 PST 2019
Author: Krzysztof Parzyszek
Date: 2019-11-12T09:43:21-06:00
New Revision: 0a58ef5eb5e1a243756f649f82834281ac3dd7ff
URL: https://github.com/llvm/llvm-project/commit/0a58ef5eb5e1a243756f649f82834281ac3dd7ff
DIFF: https://github.com/llvm/llvm-project/commit/0a58ef5eb5e1a243756f649f82834281ac3dd7ff.diff
LOG: [Hexagon] Require PS_aligna whenever variable-sized objects are present
Added:
Modified:
llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
index dc114d077361..1d3d2ea8c557 100644
--- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -2388,9 +2388,9 @@ bool HexagonFrameLowering::needsAligna(const MachineFunction &MF) const {
const MachineFrameInfo &MFI = MF.getFrameInfo();
if (!MFI.hasVarSizedObjects())
return false;
- unsigned MaxA = MFI.getMaxAlignment();
- if (MaxA <= getStackAlignment())
- return false;
+ // Do not check for max stack object alignment here, because the stack
+ // may not be complete yet. Assume that we will need PS_aligna if there
+ // are variable-sized objects.
return true;
}
More information about the llvm-commits
mailing list