[compiler-rt] 5f3818c - [scudo] Add [[no_unique_address]] attribute to new MapPlatformData variables

Dominic Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 13:13:11 PDT 2022


Author: Dominic Chen
Date: 2022-07-07T13:12:55-07:00
New Revision: 5f3818c7df7d2e2c9bc8b98d534b138f514238a4

URL: https://github.com/llvm/llvm-project/commit/5f3818c7df7d2e2c9bc8b98d534b138f514238a4
DIFF: https://github.com/llvm/llvm-project/commit/5f3818c7df7d2e2c9bc8b98d534b138f514238a4.diff

LOG: [scudo] Add [[no_unique_address]] attribute to new MapPlatformData variables

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

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/release.h
    compiler-rt/lib/scudo/standalone/vector.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/release.h b/compiler-rt/lib/scudo/standalone/release.h
index 9dad3c36520f..49cc6ae618af 100644
--- a/compiler-rt/lib/scudo/standalone/release.h
+++ b/compiler-rt/lib/scudo/standalone/release.h
@@ -138,7 +138,7 @@ class PackedCounterArray {
   uptr SizePerRegion;
   uptr BufferSize;
   uptr *Buffer;
-  MapPlatformData MapData = {};
+  [[no_unique_address]] MapPlatformData MapData = {};
 
   static HybridMutex Mutex;
   static uptr StaticBuffer[StaticBufferCount];

diff  --git a/compiler-rt/lib/scudo/standalone/vector.h b/compiler-rt/lib/scudo/standalone/vector.h
index 84e9c537d28d..d43205a7111d 100644
--- a/compiler-rt/lib/scudo/standalone/vector.h
+++ b/compiler-rt/lib/scudo/standalone/vector.h
@@ -95,7 +95,7 @@ template <typename T> class VectorNoCtor {
   T LocalData[256 / sizeof(T)] = {};
   uptr CapacityBytes = 0;
   uptr Size = 0;
-  MapPlatformData MapData = {};
+  [[no_unique_address]] MapPlatformData MapData = {};
 };
 
 template <typename T> class Vector : public VectorNoCtor<T> {


        


More information about the llvm-commits mailing list