aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Debugify.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riddleriver@gmail.com>2020-10-28 16:46:25 -0700
committerRiver Riddle <riddleriver@gmail.com>2020-10-28 16:58:06 -0700
commit1095419b10ff222c3cc362be27d97ff561a2181b (patch)
tree4fd0ada3047b7393eb90795089bbbaed6dd24cb1 /llvm/lib/Transforms/Utils/Debugify.cpp
parent49c84fd5a4bd88cbf61ac6888a66c5da07705c5e (diff)
downloadllvm-1095419b10ff222c3cc362be27d97ff561a2181b.zip
llvm-1095419b10ff222c3cc362be27d97ff561a2181b.tar.gz
llvm-1095419b10ff222c3cc362be27d97ff561a2181b.tar.bz2
[llvm][StringExtras] Add a fail-able version of `fromHex`
This revision adds a fail-able/checked version of `fromHex` that fails when the input string contains a non-hex character. This removes the need for users to have a separate check for if the string contains all hex digits. This becomes very costly for large hex strings given that checking if a string contains only hex digits is effectively the same as just converting it in the first place. Context: In MLIR we use hex strings to represent very large constants in the textual format of the IR. These changes lead to a large decrease in compile time when parsing these constants (2 seconds -> 1 second). Differential Revision: https://reviews.llvm.org/D90265
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
0 files changed, 0 insertions, 0 deletions