aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2020-12-04 14:07:49 -0800
committerKostya Kortchinsky <kostyak@google.com>2020-12-10 10:25:59 -0800
commit3f70987b352c44329db8f339d4c537a20cc98329 (patch)
treeb73f39e9351000dab3c9640cbcd1a481859939cd /clang/lib/Frontend/CompilerInvocation.cpp
parentbdaeb82a5f84b813f5eb7e63e6e111c4566c61ab (diff)
downloadllvm-3f70987b352c44329db8f339d4c537a20cc98329.zip
llvm-3f70987b352c44329db8f339d4c537a20cc98329.tar.gz
llvm-3f70987b352c44329db8f339d4c537a20cc98329.tar.bz2
[scudo][standalone] Small changes to the fastpath
There are a few things that I wanted to reorganize for a while: - the loop that incrementally goes through classes on failure looked horrible in assembly, mostly because of `LIKELY`/`UNLIKELY` within the loop. So remove those, we are already in an unlikely scenario - hooks are not used by default on Android/Fuchsia/etc so mark the tests for the existence of the weak functions as unlikely - mark of couple of conditions as likely/unlikely - in `reallocate`, the old size was computed again while we already have it in a variable. So just use the one we have. - remove the bitwise AND trick and use a logical AND, that has one less test by using a purposeful underflow when `Size` is 0 (I actually looked at the assembly of the previous code to steal that trick) - move the read of the options closer to where they are used, mark them as `const` Overall this makes things a tiny bit faster, but cleaner. Differential Revision: https://reviews.llvm.org/D92689
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions