[PATCH] D149137: [Assignment Tracking] Check getTypeSizeInBits result for scalable vector types

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 05:41:58 PDT 2023


Orlando added inline comments.


================
Comment at: llvm/lib/IR/DebugInfo.cpp:1948
+static std::optional<AssignmentInfo>
+getScalarAssignmentInfo(const DataLayout &DL, const Value *Dest, Type *StoredTy) {
+  TypeSize SizeInBits = DL.getTypeSizeInBits(StoredTy);
----------------
paulwalker-arm wrote:
> Is the use of "Scalar" here accurate? given it's only scalable vectors that are being rejected.
> 
> Only a suggestion but what about changing `getAssignmentInfoImpl` to take a `TypeSize` instead of an `uint64_t` and then reject scalable sizes within that? This way if/when scalable support is required the structure will already be in place.
Thanks, I agree that way is better - fixed.


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

https://reviews.llvm.org/D149137



More information about the llvm-commits mailing list