[llvm] [TTI] Use MemIntrinsicCostAttributes for getMaskedMemoryOpCost (PR #168029)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 18:48:41 PST 2025
================
@@ -123,6 +123,53 @@ struct HardwareLoopInfo {
LLVM_ABI bool canAnalyze(LoopInfo &LI);
};
+/// Information for memory intrinsic cost model.
+class MemIntrinsicCostAttributes {
+ /// Optional context instruction, if one exists, e.g. the
+ /// load/store to transform to the intrinsic.
+ const Instruction *I = nullptr;
+
+ /// Address in memory.
+ const Value *Ptr = nullptr;
+
+ /// Vector type of the data to be loaded or stored.
+ Type *DataTy = nullptr;
+ Intrinsic::ID IID;
+
+ /// True when the memory access is predicated with a mask
+ /// that is not a compile-time constant.
+ bool VariableMask = true;
+ unsigned AddressSpace = 0;
+
+ /// Alignment of single element.
+ Align Alignment;
+
+public:
+ LLVM_ABI MemIntrinsicCostAttributes(Intrinsic::ID Id, Type *DataTy,
----------------
arcbbb wrote:
Updated. Thanks!
https://github.com/llvm/llvm-project/pull/168029
More information about the llvm-commits
mailing list