diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2019-08-05 09:00:43 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2019-08-05 09:00:43 +0000 |
commit | 65e4b47aad33184ede8537c786cc80e6b8c32e92 (patch) | |
tree | 78abb50c221d0816da7787f7e5e5829dbe46af81 /llvm/lib/CodeGen | |
parent | 3046ef5c1101ff2b9480897a6b52d7d41a8ecf34 (diff) | |
download | bcm5719-llvm-65e4b47aad33184ede8537c786cc80e6b8c32e92.tar.gz bcm5719-llvm-65e4b47aad33184ede8537c786cc80e6b8c32e92.zip |
[LLVM][Alignment] Introduce Alignment Type in DataLayout
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: courbet, jfb, jakehehrlich
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65521
Make getFunctionPtrAlign() return MaybeAlign
llvm-svn: 367817
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp index 1ae454f4bd4..373d52fd1d4 100644 --- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp @@ -698,7 +698,7 @@ bool CombinerHelper::optimizeMemcpy(MachineInstr &MI, Register Dst, const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); if (!TRI->needsStackRealignment(MF)) while (NewAlign > Align && - DL.exceedsNaturalStackAlignment(NewAlign)) + DL.exceedsNaturalStackAlignment(llvm::Align(NewAlign))) NewAlign /= 2; if (NewAlign > Align) { @@ -804,7 +804,7 @@ bool CombinerHelper::optimizeMemmove(MachineInstr &MI, Register Dst, const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); if (!TRI->needsStackRealignment(MF)) while (NewAlign > Align && - DL.exceedsNaturalStackAlignment(NewAlign)) + DL.exceedsNaturalStackAlignment(llvm::Align(NewAlign))) NewAlign /= 2; if (NewAlign > Align) { diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 40f97eeeb79..9594dedb44b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -5804,7 +5804,7 @@ static SDValue getMemcpyLoadsAndStores(SelectionDAG &DAG, const SDLoc &dl, const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); if (!TRI->needsStackRealignment(MF)) while (NewAlign > Align && - DL.exceedsNaturalStackAlignment(NewAlign)) + DL.exceedsNaturalStackAlignment(llvm::Align(NewAlign))) NewAlign /= 2; if (NewAlign > Align) { |