diff options
author | serge-sans-paille <sguelton@mozilla.com> | 2023-10-27 22:48:08 +0200 |
---|---|---|
committer | serge-sans-paille <sguelton@mozilla.com> | 2023-10-31 00:08:01 +0100 |
commit | 8116b6dce70ef284f9a0895b0f9f45bfa9a3ade7 (patch) | |
tree | 840843dd8d26616f3878aed80430ffa19379f6d4 /lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp | |
parent | ef100c228a5913c6c54bfed8e80fd265ce8beca2 (diff) | |
download | llvm-8116b6dce70ef284f9a0895b0f9f45bfa9a3ade7.zip llvm-8116b6dce70ef284f9a0895b0f9f45bfa9a3ade7.tar.gz llvm-8116b6dce70ef284f9a0895b0f9f45bfa9a3ade7.tar.bz2 |
[clang] Change GetCharAndSizeSlow interface to by-value style
Instead of passing the Size by reference, assuming it is initialized,
return it alongside the expected char result as a POD.
This makes the interface less error prone: previous interface expected
the Size reference to be initialized, and it was often forgotten,
leading to uninitialized variable usage. This patch fixes the issue.
This also generates faster code, as the returned POD (a char and an
unsigned) fits in 64 bits. The speedup according to compile time tracker
reach -O.7%, with a good number of -0.4%. Details are available on
https://llvm-compile-time-tracker.com/compare.php?from=3fe63f81fcb999681daa11b2890c82fda3aaeef5&to=fc76a9202f737472ecad4d6e0b0bf87a013866f3&stat=instructions:u
And icing on the cake, on my setup it also shaves 2kB out of
libclang-cpp :-)
This is a recommit of d8f5a18b6e587aeaa8b99707e87b652f49b160cd for
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp')
0 files changed, 0 insertions, 0 deletions