[PATCH] D81362: [Alignment][NFC] Deprecate dead code from CallingConvLower.h

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 04:52:11 PDT 2020


gchatelet updated this revision to Diff 269171.
gchatelet added a comment.

Deprecate functions and amend commit message


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81362

Files:
  llvm/include/llvm/CodeGen/CallingConvLower.h
  llvm/lib/CodeGen/CallingConvLower.cpp


Index: llvm/lib/CodeGen/CallingConvLower.cpp
===================================================================
--- llvm/lib/CodeGen/CallingConvLower.cpp
+++ llvm/lib/CodeGen/CallingConvLower.cpp
@@ -54,7 +54,7 @@
   MF.getSubtarget().getTargetLowering()->HandleByVal(this, Size,
                                                      Alignment.value());
   Size = unsigned(alignTo(Size, MinAlign));
-  unsigned Offset = AllocateStack(Size, Alignment.value());
+  unsigned Offset = AllocateStack(Size, Alignment);
   addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
 }
 
Index: llvm/include/llvm/CodeGen/CallingConvLower.h
===================================================================
--- llvm/include/llvm/CodeGen/CallingConvLower.h
+++ llvm/include/llvm/CodeGen/CallingConvLower.h
@@ -434,7 +434,9 @@
   }
 
   // FIXME: Deprecate this function when transition to Align is over.
-  unsigned AllocateStack(unsigned Size, unsigned Alignment) {
+  LLVM_ATTRIBUTE_DEPRECATED(unsigned AllocateStack(unsigned Size,
+                                                   unsigned Alignment),
+                            "Use the version that takes Align instead.") {
     return AllocateStack(Size, Align(Alignment));
   }
 
@@ -444,7 +446,10 @@
   }
 
   /// Version of AllocateStack with extra register to be shadowed.
-  unsigned AllocateStack(unsigned Size, unsigned Align, unsigned ShadowReg) {
+  LLVM_ATTRIBUTE_DEPRECATED(unsigned AllocateStack(unsigned Size,
+                                                   unsigned Align,
+                                                   unsigned ShadowReg),
+                            "Use the version that takes Align instead.") {
     MarkAllocated(ShadowReg);
     return AllocateStack(Size, Align);
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81362.269171.patch
Type: text/x-patch
Size: 1777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200608/05f4a6a8/attachment.bin>


More information about the llvm-commits mailing list