They're computing the same thing. No functionality change.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
---|---|---|
6119 | Before we could handle table size up to UINT64_MAX / 10, after only up to UINT64_MAX / 100. That's not "no functionality change", is it? |
llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
---|---|---|
6119 | I think it's still NFC in practice; we'd return false for table sizes of that magnitude anyway. |
llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
---|---|---|
6119 | Should we just remove all the overflow checks then? |
llvm/lib/Transforms/Utils/SimplifyCFG.cpp | ||
---|---|---|
6119 | No, you can still trigger overflows here, and overflowing would cause us to return the wrong answer. For example: switch (x) { case 0: foo(); case VERY_BIG_NUMBER: bar(); } TableSize will be VERY_BIG_NUMBER + 1, so overflowing when multiplying with 10 or 100 is a real concern. But in practice, for huge table sizes, we'd return false later anyway, since it's not practically possible to have enough cases that the switch would be considered dense enough. |
Before we could handle table size up to UINT64_MAX / 10, after only up to UINT64_MAX / 100. That's not "no functionality change", is it?