[PATCH] D92237: [SCEVExpander] NFCI: Change Cost type in costAndCollectOperands from int -> unsigned.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 07:40:33 PST 2020
sdesmalen abandoned this revision.
sdesmalen added a comment.
In D92237#2420530 <https://reviews.llvm.org/D92237#2420530>, @lebedev.ri wrote:
> 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
> (or failing to do that, and having an infinite budget)
Fair enough, I didn't realise it had already been changed before. I thought it would be useful to rewrite it in anticipation of the `InstructionCost` class, but I've rewritten that patch now (D92238 <https://reviews.llvm.org/D92238>).
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