[all-commits] [llvm/llvm-project] 20105b: [clang] Speedup line offset mapping computation
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Thu Apr 8 01:12:51 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 20105b6b4874a85813f7a4a3d8ad2a0f023dda14
https://github.com/llvm/llvm-project/commit/20105b6b4874a85813f7a4a3d8ad2a0f023dda14
Author: serge-sans-paille <sguelton at redhat.com>
Date: 2021-04-08 (Thu, 08 Apr 2021)
Changed paths:
M clang/lib/Basic/SourceManager.cpp
Log Message:
-----------
[clang] Speedup line offset mapping computation
Clang spends a decent amount of time in the LineOffsetMapping::get(...)
function. This function used to be vectorized (through SSE2) then the
optimization got dropped because the sequential version was on-par performance
wise.
This provides an optimization of the sequential version that works on a word at
a time, using (documented) bithacks to provide a portable vectorization.
When preprocessing the sqlite amalgamation, this yields a sweet 3% speedup.
This is a recommit of 6951b72334bbe4c189c71751edc1e361d7b5632c with endianness
and unsigned long vs uint64_t issues fixed (hopefully).
Differential Revision: https://reviews.llvm.org/D99409
More information about the All-commits
mailing list