diff options
author | Nikita Popov <npopov@redhat.com> | 2023-11-13 15:47:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 15:47:15 +0100 |
commit | 0a0e06f29145213e90de88ca39f7b505ce092a4a (patch) | |
tree | 0daf2b0efd4ca1601b9fda90fd3a86cc524d1ad0 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | d64d5ea102567da82b33d719d9358824bb70f927 (diff) | |
download | llvm-0a0e06f29145213e90de88ca39f7b505ce092a4a.zip llvm-0a0e06f29145213e90de88ca39f7b505ce092a4a.tar.gz llvm-0a0e06f29145213e90de88ca39f7b505ce092a4a.tar.bz2 |
[TableGen] Fix prefix detection with anchor (NFC) (#71379)
instregex uses an optimization, where the constant prefix of the regex
is extracted to perform a binary search first. However, this
optimization currently mainly fails to apply, because most instregex
uses have an explicit ^ anchor, which gets counted as a meta char and
disables the optimization.
Make sure the anchor is skipped when determining the prefix. Also fix an
implementation bug this exposes, where the pick a too long prefix if the
first meta character is a quantifier.
This cuts the time needed to generate files like X86GenInstrInfo.inc by
half.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions