sdesmalen added inline comments.

================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1327
+  if (Size.isScalable())
+    Size = llvm::TypeSize::Fixed(-1);
+
----------------
Instead of updating `Size` here, can you change line 1332 to be:

  llvm::Value *SizeV = llvm::ConstantInt::get(Int64Ty, Size.isScalable() ? -1 : 
Size.getFixedValue())


================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1332
          "Pointer should be in alloca address space");
   llvm::Value *SizeV = llvm::ConstantInt::get(Int64Ty, Size);
   Addr = Builder.CreateBitCast(Addr, AllocaInt8PtrTy);
----------------
Does `ConstantInt` take `TypeSize Size` as argument?


================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1558
           emission.SizeForLifetimeMarkers =
-              size.isScalable() ? EmitLifetimeStart(-1, 
AllocaAddr.getPointer())
-                                : EmitLifetimeStart(size.getFixedSize(),
-                                                    AllocaAddr.getPointer());
+              EmitLifetimeStart(size, AllocaAddr.getPointer());
         }
----------------
nit: Given you have to update this line, maybe also to capitalize `size -> 
Size`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102822/new/

https://reviews.llvm.org/D102822

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to