[llvm] 7f37d88 - [Alignment][NFC] Migrate MachineFrameInfo::CreateSpillStackObject to Align

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 01:49:39 PDT 2020


Author: Guillaume Chatelet
Date: 2020-07-01T08:49:28Z
New Revision: 7f37d8830635bf119a5f630dd3958c8f45780805

URL: https://github.com/llvm/llvm-project/commit/7f37d8830635bf119a5f630dd3958c8f45780805
DIFF: https://github.com/llvm/llvm-project/commit/7f37d8830635bf119a5f630dd3958c8f45780805.diff

LOG: [Alignment][NFC] Migrate MachineFrameInfo::CreateSpillStackObject to Align

iThis 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

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

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MachineFrameInfo.h
    llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachineFrameInfo.h b/llvm/include/llvm/CodeGen/MachineFrameInfo.h
index d0a8f04f543a..cd6eafb2b571 100644
--- a/llvm/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineFrameInfo.h
@@ -768,8 +768,9 @@ class MachineFrameInfo {
   /// Create a new statically sized stack object that represents a spill slot,
   /// returning a nonnegative identifier to represent it.
   int CreateSpillStackObject(uint64_t Size, Align Alignment);
-  /// FIXME: Remove this function when transition to Align is over.
-  inline int CreateSpillStackObject(uint64_t Size, unsigned Alignment) {
+  LLVM_ATTRIBUTE_DEPRECATED(
+      inline int CreateSpillStackObject(uint64_t Size, unsigned Alignment),
+      "Use CreateSpillStackObject that takes an Align instead") {
     return CreateSpillStackObject(Size, assumeAligned(Alignment));
   }
 

diff  --git a/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp b/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
index 0c8d5218bab5..27319804049d 100644
--- a/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
+++ b/llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
@@ -132,7 +132,7 @@ class FrameIndexesCache {
       }
       return FI;
     }
-    int FI = MFI.CreateSpillStackObject(Size, Size);
+    int FI = MFI.CreateSpillStackObject(Size, Align(Size));
     NumSpillSlotsAllocated++;
     Line.Slots.push_back(FI);
     ++Line.Index;


        


More information about the llvm-commits mailing list