[PATCH] D90320: [llvm][StringExtras] Use a lookup table for `hexDigitValue`

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 10:57:11 PDT 2020


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

If you like you could try rephrasing this as a programmatic initialization rather than writing it all out manually, might make it easier to read/look more like the original code (except applied as a loop over the range/table) and hopefully can be phrased in such a way that the compiler boils it down to the same values anyway.



================
Comment at: llvm/include/llvm/ADT/StringExtras.h:70
+  // clang-format off
+  static unsigned LUT[255] = {
+    /// 0-47: Non hexadecimal digits
----------------
const?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90320



More information about the llvm-commits mailing list