[llvm] [GlobalISel] Preserve cache hint metadata through IRTranslator (PR #224522)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 12:51:21 PDT 2026
================
@@ -1264,6 +1264,15 @@ class LLVM_ABI TargetLoweringBase {
// value representing memory location
PointerUnion<const Value *, const PseudoSourceValue *> ptrVal;
+ // Index of the call argument represented by ptrVal. This allows
+ // per-argument metadata to be associated with this memory access.
+ std::optional<unsigned> ptrArgIndex;
+
+ void setPointerOperand(const CallBase &I, unsigned ArgNo) {
+ ptrVal = I.getArgOperand(ArgNo);
+ ptrArgIndex = ArgNo;
+ }
----------------
arsenm wrote:
I don't think it makes sense to record operand indexes here. The point of this struct is to extract all the relevant information from the IR intrinsic on the way to the DAG, where the operand indices aren't exactly the same
https://github.com/llvm/llvm-project/pull/224522
More information about the llvm-commits
mailing list