[PATCH] D92238: [SCEVExpander] Migrate costAndCollectOperands to use InstructionCost.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 13:40:57 PST 2021


sdesmalen updated this revision to Diff 319105.
sdesmalen added a comment.

An attempt to meet in the middle:

- No need for `InstructionBudget` class.
- No need for any changes to `return BudgetRemaining < 0` in `isHighCostExpansionHelper`.

Instead, the check for `BudgetRemaining.isValid()` is now done at the end in `isHighCostExpansion`. If the helper function found the budget has exceeded, or if the resulting budget has been invalidated, the expansion is considered high cost.

Is this a step in the right direction?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92238/new/

https://reviews.llvm.org/D92238

Files:
  llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
  llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92238.319105.patch
Type: text/x-patch
Size: 6284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210125/6620b14b/attachment.bin>


More information about the llvm-commits mailing list