[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
Tue Sep 17 08:26:01 PDT 2019


evandro marked 3 inline comments as done.
evandro added a comment.

Thank you.



================
Comment at: llvm/include/llvm/CodeGen/SwitchLoweringUtils.h:236
+                                bool HasReachableDefault,
+                                uint64_t Cases, uint64_t Range);
+
----------------
hans wrote:
> 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.
That is true, but, whenever `getJumpTableNumTargets()` is called, those values are calculated and then used again.  So, at least for this use case, it seems to be more efficient to let `getJumpTableNumTargets()` calculate and return them through references.


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

https://reviews.llvm.org/D60295





More information about the llvm-commits mailing list