diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-12-06 16:53:24 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-12-06 16:53:24 +0000 |
commit | c89976de25cd7700d24796f7f2fa9f20e51e4813 (patch) | |
tree | 1dd9bd94be551bef79ec8a8a84deafdc474800fb /lib/interception/interception_mac.h | |
parent | 92feb463e158b8a1492c04c281fa24c9674be4e8 (diff) |
[scudo] Correct performance regression in Secondary
Summary:
This wasn't noticed: `RoundUpTo` doesn't produce a constant expression, so the
sizes were not constant either. Enforce them to be static const, replace
`RoundUpTo` by its expression. The compiler can now optimize the associated
computations accordingly.
Also looking at the produced assembly, `PageSize` was fetched multiple times
during `Allocate`, so keep a local value of it. As a result it's fetched once
and kept in a register.
Reviewers: alekseyshl, flowerhack
Reviewed By: alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40862
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception/interception_mac.h')
0 files changed, 0 insertions, 0 deletions