[PATCH] D60673: [SimplifyCFG] Improove and speed up ReduceSwitchRange

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 06:47:56 PDT 2019


lebedev.ri added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:5498
-  uint64_t NumCases = Values.size();
-  // 40% is the default density for building a jump table in optsize/minsize mode.
-  uint64_t MinDensity = 40;
----------------
So what about `-Os`/`-Oz`?


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:5629-5633
   // The conversion from switch to lookup tables results in difficult-to-analyze
   // code and makes pruning branches much harder. This is a problem if the
   // switch expression itself can still be restricted as a result of inlining or
   // CVP. Therefore, only apply this transformation during late stages of the
   // optimisation pipeline.
----------------
Did you see this comment?


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

https://reviews.llvm.org/D60673





More information about the llvm-commits mailing list