[llvm] [SandboxIR] Add tracking for `ShuffleVectorInst::setShuffleMask`. (PR #105590)
Jorge Gorbe Moya via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 15:56:12 PDT 2024
================
@@ -1868,6 +1868,11 @@ Value *ShuffleVectorInst::create(Value *V1, Value *V2, ArrayRef<int> Mask,
return Ctx.getOrCreateConstant(cast<llvm::Constant>(NewV));
}
+void ShuffleVectorInst::setShuffleMask(ArrayRef<int> Mask) {
+ Ctx.getTracker().emplaceIfTracking<ShuffleVectorSetMask>(this);
----------------
slackito wrote:
I created a new class specifically because I thought `GenericSetter` wouldn't work with `ArrayRef` because we need a copy. I'm not sure if we can make it work with `ArrayRef` (maybe adding some template specialization that always copies if the getter returns an `ArrayRef`? not sure if that's actually possible).
We can always revisit this if we see more instances of getters that return ArrayRef that we could generalize. For now, this is a one-off so I think it's okay to keep it as is.
https://github.com/llvm/llvm-project/pull/105590
More information about the llvm-commits
mailing list