-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[TTI] Remove masked/gather-scatter/strided/expand-compress costing from TTIImpl #169885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0f5e5bc
f522fa4
0234364
1c2589a
c290e1e
8d8d5bb
4c70b1b
da79907
d0dccfc
f84eaab
8aca373
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,10 +223,24 @@ InstructionCost HexagonTTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src, | |
| OpInfo, I); | ||
| } | ||
|
|
||
| InstructionCost | ||
| HexagonTTIImpl::getMemIntrinsicInstrCost(const MemIntrinsicCostAttributes &MICA, | ||
| TTI::TargetCostKind CostKind) const { | ||
| switch (MICA.getID()) { | ||
| case Intrinsic::masked_scatter: | ||
| case Intrinsic::masked_gather: | ||
| return getGatherScatterOpCost(MICA, CostKind); | ||
| case Intrinsic::masked_load: | ||
| case Intrinsic::masked_store: | ||
| return getMaskedMemoryOpCost(MICA, CostKind); | ||
| } | ||
| return BaseT::getMemIntrinsicInstrCost(MICA, CostKind); | ||
| } | ||
|
|
||
| InstructionCost | ||
| HexagonTTIImpl::getMaskedMemoryOpCost(const MemIntrinsicCostAttributes &MICA, | ||
| TTI::TargetCostKind CostKind) const { | ||
| return BaseT::getMaskedMemoryOpCost(MICA, CostKind); | ||
| return BaseT::getMemIntrinsicInstrCost(MICA, CostKind); | ||
| } | ||
|
|
||
| InstructionCost | ||
|
|
@@ -238,11 +252,10 @@ HexagonTTIImpl::getShuffleCost(TTI::ShuffleKind Kind, VectorType *DstTy, | |
| return 1; | ||
| } | ||
|
|
||
| InstructionCost HexagonTTIImpl::getGatherScatterOpCost( | ||
| unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask, | ||
| Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I) const { | ||
| return BaseT::getGatherScatterOpCost(Opcode, DataTy, Ptr, VariableMask, | ||
| Alignment, CostKind, I); | ||
| InstructionCost | ||
| HexagonTTIImpl::getGatherScatterOpCost(const MemIntrinsicCostAttributes &MICA, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you do this API change in a prior change? It would reduce the mechanical part of the diff here significantly. Happy to review if you want to put it up and tag me.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realized you already had this change on review as #168650, and had even mentioned it in the review description. Sorry for not noticing, you have an LGTM there and can rebase this one you land it. |
||
| TTI::TargetCostKind CostKind) const { | ||
| return BaseT::getMemIntrinsicInstrCost(MICA, CostKind); | ||
| } | ||
|
|
||
| InstructionCost HexagonTTIImpl::getInterleavedMemoryOpCost( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these overrides can just be removed? (In a separate earlier patch)