As discussed in D76434, to enable the cost of constants, the helper function has been reorganised:
- A struct has been introduced to hold SCEV operand information so that we know the user of the operand, as well as the operand index. The Worklist now uses instead instead of a bare SCEV.
- The costing of each SCEV, and collection of its operands, is now performed in a helper function.
- Some SCEVExprs have been modified to provide methods that allow us to iterate through their operands.
The variables could use doxygen comments