diff options
author | serge-sans-paille <serge.guelton@telecom-bretagne.eu> | 2023-11-06 07:13:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-06 07:13:05 +0000 |
commit | 95dd17848383315050a5d64051bd695d0a653c51 (patch) | |
tree | c2a512fb20acfa9c6be783ab7ad0395ae3b5d18a /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | a5d25708616d692592e705a0913afd78237698af (diff) | |
download | llvm-95dd17848383315050a5d64051bd695d0a653c51.zip llvm-95dd17848383315050a5d64051bd695d0a653c51.tar.gz llvm-95dd17848383315050a5d64051bd695d0a653c51.tar.bz2 |
[clang] Change representation of CurLexerKind (#70381)
Previous representation used an enumeration combined to a switch to
dispatch to the appropriate lexer.
Use function pointer so that the dispatching is just an indirect call,
which is actually better because lexing is a costly task compared to a
function call.
This also makes the code slightly cleaner, speedup on compile time
tracker are consistent and range form -0.05% to -0.20% for NewPM-O0-g,
see
https://llvm-compile-time-tracker.com/compare.php?from=f9906508bc4f05d3950e2219b4c56f6c078a61ef&to=608c85ec1283638db949d73e062bcc3355001ce4&stat=instructions:u
Considering just the preprocessing task, preprocessing the sqlite
amalgametion takes -0.6% instructions (according to valgrind
--tool=callgrind)
---------
Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
Co-authored-by: cor3ntin <corentinjabot@gmail.com>
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions