[PATCH] D25212: Switch lowering: improve partitioning of jump tables

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 11:34:54 PDT 2016

hans accepted this revision.
hans added a comment.
This revision is now accepted and ready to land.

Looks good to me!

Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8482
   SmallVector<unsigned, 8> LastElement(N);
-  // NumTables[i]: nbr of >= MinJumpTableSize partitions from Clusters[i..N-1].
-  SmallVector<unsigned, 8> NumTables(N);
+  // PartitionScore[i] is used to break ties when choosing between two
+  // partitionings resulting in the same number of partitions.
Nit: the comment needs an update to match the variable name.



More information about the llvm-commits mailing list