[PATCH] D82939: [Alignment][NFC] Migrate TargetTransformInfo::CreateVariableSizedObject to Align
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 02:07:45 PDT 2020
gchatelet created this revision.
gchatelet added a reviewer: courbet.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This patch is part of a series 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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D82939
Files:
llvm/include/llvm/CodeGen/MachineFrameInfo.h
llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Index: llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -190,7 +190,7 @@
// stack allocation for each one.
// Inform the Frame Information that we have variable-sized objects.
MF->getFrameInfo().CreateVariableSizedObject(
- Alignment <= StackAlign ? 0 : Alignment.value(), AI);
+ Alignment <= StackAlign ? Align(1) : Alignment, AI);
}
}
Index: llvm/include/llvm/CodeGen/MachineFrameInfo.h
===================================================================
--- llvm/include/llvm/CodeGen/MachineFrameInfo.h
+++ llvm/include/llvm/CodeGen/MachineFrameInfo.h
@@ -784,7 +784,9 @@
/// created, whether or not the index returned is actually used.
int CreateVariableSizedObject(Align Alignment, const AllocaInst *Alloca);
/// FIXME: Remove this function when transition to Align is over.
- int CreateVariableSizedObject(unsigned Alignment, const AllocaInst *Alloca) {
+ LLVM_ATTRIBUTE_DEPRECATED(int CreateVariableSizedObject(
+ unsigned Alignment, const AllocaInst *Alloca),
+ "Use the version that takes an Align instead") {
return CreateVariableSizedObject(assumeAligned(Alignment), Alloca);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82939.274718.patch
Type: text/x-patch
Size: 1440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200701/792c8110/attachment.bin>
More information about the llvm-commits
mailing list