You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An obvious instance where this is advantageous is where the selected operands are constants which then enables constant folding (a and b are constants in the example).
Example IR which should be optimized but currently isn't:
Both directions may be possible/pprofitable. Fundamentally it's trading off multiple instances of a function with specialized parameters vs a single general instance plus/minus some select overhead. In general, there may be area/delay tradeoffs.
An operation in which all of its operations are selects on the same predicate can be hoisted above the select, for example:
An obvious instance where this is advantageous is where the selected operands are constants which then enables constant folding (
a
andb
are constants in the example).Example IR which should be optimized but currently isn't:
This optimization is a special case of the following transform which moves operations across selects:
Both directions may be possible/pprofitable. Fundamentally it's trading off multiple instances of a function with specialized parameters vs a single general instance plus/minus some select overhead. In general, there may be area/delay tradeoffs.
Related:
#938
#1068
The text was updated successfully, but these errors were encountered: