In future patches`SCEVExpander::isHighCostExpansionHelper()` will respect the budget allocated by performing TTI cost modelling.
This is a fully NFC patch to make things reviewable.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Analysis/ScalarEvolutionExpander.h | ||
---|---|---|
186–188 | Absolutely not. |
llvm/include/llvm/Analysis/ScalarEvolutionExpander.h | ||
---|---|---|
331 | There are two functions here: isHighCostExpansionHelper() The helper is internal and self-recursive, and must have *signed* The isHighCostExpansion() is public, and is normally called with I suppose i could rename scev-cheap-expansion-budget param |
llvm/include/llvm/Analysis/ScalarEvolutionExpander.h | ||
---|---|---|
331 | And how it's going to work if the user specifies bugdet greater than max signed int? |
llvm/include/llvm/Analysis/ScalarEvolutionExpander.h | ||
---|---|---|
331 | And if it's signed, what happens if the specified value overflows during it's multiplication by TargetTransformInfo::TCC_Basic? All these options are by definition internal, non-public. I'm not very sure |
Thank you for the review!
To be noted, i'm not vehemently opposed to hardening, but not before
there is a clear idea what we should be actually doing for the undefined cases.
Should it be unsigned?