[PATCH] D60295: [CodeGen] Replace -max-jump-table-size with -max-jump-table-targets

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 06:42:41 PDT 2019


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

lgtm with comments



================
Comment at: llvm/include/llvm/CodeGen/SwitchLoweringUtils.h:236
+                                bool HasReachableDefault,
+                                uint64_t Cases, uint64_t Range);
+
----------------
Since it has access to Clusters and First and Last, passing in Cases and Range seems redundant. It seems the function should be able to figure those things out itself.


================
Comment at: llvm/lib/CodeGen/SwitchLoweringUtils.cpp:139
+  SmallVector<unsigned, 8> PartitionsScore(N);
+  // For PartitionTrait, collection of partition traits, made up of, for a given
+  // cluster, the range of the cases, their number and the number of unique
----------------
The comment needs updating for the PartitionTrait rename.


================
Comment at: llvm/lib/CodeGen/SwitchLoweringUtils.cpp:147
+  };
+  // PartitionsStats[j] is the traits for the partition Clusters[i..j].
+  SmallVector<PartitionStats, 8> PartitionsStats(N);
----------------
s/traits/stats/
And thanks for updating the indexing, this is easier to follow.


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

https://reviews.llvm.org/D60295





More information about the llvm-commits mailing list