summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-08-21 14:29:30 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-08-21 14:29:30 +0000
commit1c18a9cb9eef141ccd3482e351811a98a7f61844 (patch)
tree692a654646ac6ce5204af5004b6e6e82f80d6cd7 /llvm/lib/Target
parent717717b1ff8b6ee48331a86feaf2f68b28b6c9d8 (diff)
downloadbcm5719-llvm-1c18a9cb9eef141ccd3482e351811a98a7f61844.tar.gz
bcm5719-llvm-1c18a9cb9eef141ccd3482e351811a98a7f61844.zip
[LLVM][Alignment] Introduce Alignment In MachineFrameInfo
Summary: This is patch is part of a serie to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: jfb Subscribers: hiraditya, dexonsmith, llvm-commits, courbet Tags: #llvm Differential Revision: https://reviews.llvm.org/D65800 llvm-svn: 369531
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp6
-rw-r--r--llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
index 0b7f416f3bb..70afec14b51 100644
--- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -1377,10 +1377,10 @@ void HexagonFrameLowering::processFunctionBeforeFrameFinalized(
}
MFI.setLocalFrameSize(LFS);
- unsigned A = MFI.getLocalFrameMaxAlign();
+ Align A = MFI.getLocalFrameMaxAlign();
assert(A <= 8 && "Unexpected local frame alignment");
- if (A == 0)
- MFI.setLocalFrameMaxAlign(8);
+ if (A == 1)
+ MFI.setLocalFrameMaxAlign(llvm::Align(8));
MFI.setUseLocalStackAllocationBlock(true);
// Set the physical aligned-stack base address register.
diff --git a/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp b/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
index 4c5a9adf1f6..a7127b0e9a9 100644
--- a/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
@@ -178,7 +178,7 @@ NVPTXPrologEpilogPass::calculateFrameObjectOffsets(MachineFunction &Fn) {
// frame index registers. Functions which don't want/need this optimization
// will continue to use the existing code path.
if (MFI.getUseLocalStackAllocationBlock()) {
- unsigned Align = MFI.getLocalFrameMaxAlign();
+ unsigned Align = MFI.getLocalFrameMaxAlign().value();
// Adjust to alignment boundary.
Offset = (Offset + Align - 1) / Align * Align;
OpenPOWER on IntegriCloud