[PATCH] D60295: [CodeGen] Replace -max-jump-table-size with -max-jump-table-targets
Evandro Menezes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 11:18:05 PDT 2019
evandro marked 2 inline comments as done.
evandro added inline comments.
================
Comment at: llvm/lib/CodeGen/SwitchLoweringUtils.cpp:55
+ // Accumulated number of cases in each cluster and those prior to it.
+ SmallVector<unsigned, 8> AllCases(Last + 1);
+ // Accumulated instances of unique targets.
----------------
hans wrote:
> There's still no need for the vector.
>
> The number of cases from First to Last is the sum of (Clusters[i].High - Clusters[i].Low) for each i between First and Last. The sum can be computed directly since we're running the for-loop anyway. There's no need to use the vector.
I see, inlining the functions makes this clear.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60295/new/
https://reviews.llvm.org/D60295
More information about the llvm-commits
mailing list