Page MenuHomePhabricator

[SLPVectorizer]Migrate getTreeCost() to use InstructionCost
ClosedPublic

Authored by CarolineConcatto on Dec 10 2020, 9:10 AM.

Details

Summary

This patch changes the type of cost variables (for instance: Cost, ExtractCost,
SpillCost) to use InstructionCost.
This patch also changes the type of cost variables to InstructionCost in other
functions that use the result of getTreeCost()
This patch is part of a series of patches to use InstructionCost instead of
unsigned/int for the cost model functions.

See this thread for context:
http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Depends on D91174

Diff Detail

Event Timeline

CarolineConcatto requested review of this revision.Dec 10 2020, 9:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2020, 9:10 AM
CarolineConcatto retitled this revision from [CostModel]Migrate getTreeCost() to use InstructionCost to [SLPVectorizer]Migrate getTreeCost() to use InstructionCost.Dec 10 2020, 9:15 AM
sdesmalen added inline comments.Dec 10 2020, 9:20 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
6216

Where does the - come from in front of SLPCostThreshold?

  • fix SLPCostThreshold to use getValue()
CarolineConcatto marked an inline comment as done.Dec 14 2020, 1:12 AM
This revision is now accepted and ready to land.Dec 14 2020, 1:32 AM
This revision was landed with ongoing or failed builds.Dec 16 2020, 5:10 AM
This revision was automatically updated to reflect the committed changes.