mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
5d8e9991c3
This patch makes the operations on InstructionCost saturate, so that when costs are accumulated they saturate to <max value>. One of the compelling reasons for wanting to have saturation support is because in various places, arbitrary values are used to represent a 'high' cost, but when accumulating the cost of some set of operations or a loop, overflow is not taken into account, which may lead to unexpected results. By defining the operations to saturate, we can express the cost of something 'very expensive' as InstructionCost::getMax(). Reviewed By: kparzysz, dmgreen Differential Revision: https://reviews.llvm.org/D105108 |
||
---|---|---|
.. | ||
llvm | ||
llvm-c |