[Mlir-commits] [mlir] 3b7f8da - [mlir] Properly align StorageUniquer::BaseStorage to fix 32 bit build

River Riddle llvmlistbot at llvm.org
Wed May 19 13:46:50 PDT 2021


Author: River Riddle
Date: 2021-05-19T13:46:43-07:00
New Revision: 3b7f8daed4b2ce9f2d3ba6c4668f7b21d015f27c

URL: https://github.com/llvm/llvm-project/commit/3b7f8daed4b2ce9f2d3ba6c4668f7b21d015f27c
DIFF: https://github.com/llvm/llvm-project/commit/3b7f8daed4b2ce9f2d3ba6c4668f7b21d015f27c.diff

LOG: [mlir] Properly align StorageUniquer::BaseStorage to fix 32 bit build

We allow stealing up to 3 bits of pointers to BaseStorage, so we need to make sure that we align by at least 8.

Added: 
    

Modified: 
    mlir/include/mlir/Support/StorageUniquer.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Support/StorageUniquer.h b/mlir/include/mlir/Support/StorageUniquer.h
index 2b66edb51ac99..0b9a938b3383d 100644
--- a/mlir/include/mlir/Support/StorageUniquer.h
+++ b/mlir/include/mlir/Support/StorageUniquer.h
@@ -81,7 +81,7 @@ class StorageUniquer {
 public:
   /// This class acts as the base storage that all storage classes must derived
   /// from.
-  class BaseStorage {
+  class alignas(8) BaseStorage {
   protected:
     BaseStorage() = default;
   };


        


More information about the Mlir-commits mailing list