[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #86923)

Mike Rice via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 16:37:26 PDT 2024


================
@@ -201,14 +211,26 @@ template <> struct DominatingValue<RValue> {
   class saved_type {
     enum Kind { ScalarLiteral, ScalarAddress, AggregateLiteral,
                 AggregateAddress, ComplexAddress };
-
-    llvm::Value *Value;
-    llvm::Type *ElementType;
+    union {
+      struct {
+        DominatingLLVMValue::saved_type first, second;
+      } Vals;
+      DominatingValue<Address>::saved_type AggregateAddr;
+    };
     LLVM_PREFERRED_TYPE(Kind)
     unsigned K : 3;
-    unsigned Align : 29;
-    saved_type(llvm::Value *v, llvm::Type *e, Kind k, unsigned a = 0)
-      : Value(v), ElementType(e), K(k), Align(a) {}
+    unsigned IsVolatile : 1;
----------------
mikerice1969 wrote:

Hi @ahatanak, static verifier is concerned that IsVolatile is not initialized in the constructor. Can we add an initializer here? Also one of the constructors below has a IsVolatile parameter but isn't using it to initialize the field. Do you know what we should be doing here?

https://github.com/llvm/llvm-project/pull/86923


More information about the cfe-commits mailing list