NFC: Migrate SpeculateAroundPHIs to work on InstructionCost
authorSander de Smalen <sander.desmalen@arm.com>
Tue, 2 Feb 2021 12:50:18 +0000 (12:50 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Tue, 2 Feb 2021 13:32:45 +0000 (13:32 +0000)
commit3d3ca8f8ebc4a7e50e1bb1f6eb6a92056a69fd71
tree94740349bc849cafded5620f9ea6f26d80ac49f6
parent00da3227882654533efe9ae62023e367e4a88e29
NFC: Migrate SpeculateAroundPHIs to work on InstructionCost

This patch migrates cost values and arithmetic to work on InstructionCost.
When the interfaces to TargetTransformInfo are changed, any InstructionCost
state will propagate naturally.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Reviewed By: ctetreau

Differential Revision: https://reviews.llvm.org/D95353
llvm/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp