[llvm] 5407661 - [Alignment][NFC] Deprecate dead code from CallingConvLower.h

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 07:49:58 PDT 2020


Author: Guillaume Chatelet
Date: 2020-06-08T14:49:39Z
New Revision: 54076610dc45b3b86e6ac957945e968c93826efc

URL: https://github.com/llvm/llvm-project/commit/54076610dc45b3b86e6ac957945e968c93826efc
DIFF: https://github.com/llvm/llvm-project/commit/54076610dc45b3b86e6ac957945e968c93826efc.diff

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

Summary: This is a followup on D81196.

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81362

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/CallingConvLower.h b/llvm/include/llvm/CodeGen/CallingConvLower.h
index 41e4db7fcae3..ef2f25e75065 100644
--- a/llvm/include/llvm/CodeGen/CallingConvLower.h
+++ b/llvm/include/llvm/CodeGen/CallingConvLower.h
@@ -434,7 +434,9 @@ class CCState {
   }
 
   // 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 @@ class CCState {
   }
 
   /// 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);
   }

diff  --git a/llvm/lib/CodeGen/CallingConvLower.cpp b/llvm/lib/CodeGen/CallingConvLower.cpp
index 366cd985ecf3..3d8c2c8b00aa 100644
--- a/llvm/lib/CodeGen/CallingConvLower.cpp
+++ b/llvm/lib/CodeGen/CallingConvLower.cpp
@@ -52,7 +52,7 @@ void CCState::HandleByVal(unsigned ValNo, MVT ValVT, MVT LocVT,
   ensureMaxAlignment(Alignment);
   MF.getSubtarget().getTargetLowering()->HandleByVal(this, Size, Alignment);
   Size = unsigned(alignTo(Size, MinAlign));
-  unsigned Offset = AllocateStack(Size, Alignment.value());
+  unsigned Offset = AllocateStack(Size, Alignment);
   addLoc(CCValAssign::getMem(ValNo, ValVT, Offset, LocVT, LocInfo));
 }
 


        


More information about the llvm-commits mailing list