[SCEV] SCEVExpander::isHighCostExpansionHelper(): begin cost modelling - model cast cost
Summary: This is not a NFC, although it does not change any of the existing tests. I'm not really sure if we should have specific tests for the cost modelling itself. This is the first patch that actually makes `SCEVExpander::isHighCostExpansionHelper()` account for the cost of the SCEV expression, and consider the budget available, by modelling cast expressions. I believe the logic itself is "pretty obviously correct" - from budget, we need to subtract the cost of the cast expression from inner type `Op->getType()` to the `S->getType()` type, and recurse into the expression we are casting. Reviewers: reames, mkazantsev, wmi, sanjoy Reviewed By: mkazantsev Subscribers: xbolva00, hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73716
Loading
Please sign in to comment