[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 07:33:36 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG27bbc8ede127: [Alignment][NFC] Migrate TargetTransformInfo::CreateVariableSizedObject to Align (authored by gchatelet).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82939/new/

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
@@ -785,7 +785,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.274803.patch
Type: text/x-patch
Size: 1440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200701/a739f711/attachment.bin>


More information about the llvm-commits mailing list