[PATCH] D92237: [SCEVExpander] NFCI: Change Cost type in costAndCollectOperands from int -> unsigned.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 27 10:19:22 PST 2020


lebedev.ri added a comment.

I don't like this.
I intentionally made this change from unsigned to signed back in D67318 <https://reviews.llvm.org/D67318>,
and then followed the same pattern when re-writing `isHighCostExpansionHelper()`,
because using signed is that much more easy to catch budget overrun
as opposed to basically ensuring that each subtraction doesn't cause an overflow.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92237



More information about the llvm-commits mailing list