[llvm] [AArch64][CostModel] Consider the cost of const vector (PR #117539)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 03:19:37 PST 2024
================
@@ -235,10 +235,17 @@ class AArch64TTIImpl : public BasicTTIImplBase<AArch64TTIImpl> {
bool useNeonVector(const Type *Ty) const;
InstructionCost
- getMemoryOpCost(unsigned Opcode, Type *Src, MaybeAlign Alignment,
- unsigned AddressSpace, TTI::TargetCostKind CostKind,
- TTI::OperandValueInfo OpInfo = {TTI::OK_AnyValue, TTI::OP_None},
- const Instruction *I = nullptr);
+ getConstVectCost(unsigned Opcode, Type *Src, MaybeAlign Alignment,
+ unsigned AddressSpace, TTI::TargetCostKind CostKind,
+ TTI::OperandValueInfo OpInfo, const Instruction *I,
+ const bool SrcIsConstVect, InstructionCost ScalarCost);
+
+ InstructionCost getMemoryOpCost(
+ unsigned Opcode, Type *Src, MaybeAlign Alignment, unsigned AddressSpace,
+ TTI::TargetCostKind CostKind,
+ TTI::OperandValueInfo OpInfo = {TTI::OK_AnyValue, TTI::OP_None},
+ const Instruction *I = nullptr, const bool SrcIsConstVect = false,
+ InstructionCost ScalarCost = 10000);
----------------
sushgokh wrote:
Passing `SrcIsConstVect` was intentional since otherwise we wouldn't know why the ScalarCost has been passed to the API.
About the magic no. Yes, will surely change it.
https://github.com/llvm/llvm-project/pull/117539
More information about the llvm-commits
mailing list