HomePhabricator

[scudo] Correct performance regression in Secondary

Authored by cryptoad on Dec 6 2017, 8:53 AM.

Description

[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

llvm-svn: 319903

Details

Committed
cryptoadDec 6 2017, 8:53 AM
Reviewer
alekseyshl
Differential Revision
D40862: [scudo] Correct performance regression in Secondary
Parents
rG9e5e51aeed06: [opt-viewer] Suppress noisy Swift remarks
Branches
Unknown
Tags
Unknown