diff options
author | Krzysztof Parzyszek <kparzysz@quicinc.com> | 2019-11-08 19:05:28 -0600 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@quicinc.com> | 2019-11-12 09:43:21 -0600 |
commit | 0a58ef5eb5e1a243756f649f82834281ac3dd7ff (patch) | |
tree | a88c7c98d0988087403faa9032aaf7d27ff4b147 | |
parent | 228dd96c6fddad6d070c29a6830c7bd161982e3a (diff) | |
download | bcm5719-llvm-0a58ef5eb5e1a243756f649f82834281ac3dd7ff.tar.gz bcm5719-llvm-0a58ef5eb5e1a243756f649f82834281ac3dd7ff.zip |
[Hexagon] Require PS_aligna whenever variable-sized objects are present
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp index dc114d07736..1d3d2ea8c55 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; } |