This is an archive of the discontinued LLVM Phabricator instance.

scudo: Simplify getClassIdBySize() logic. NFCI.
ClosedPublic

Authored by pcc on Feb 3 2020, 4:34 PM.

Details

Summary

By subtracting 1 from Size at the beginning we can simplify the
subsequent calculations. This also saves 4 instructions on aarch64
and 9 instructions on x86_64, but seems to be perf neutral.

Diff Detail

Event Timeline

pcc created this revision.Feb 3 2020, 4:34 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 3 2020, 4:35 PM
Herald added subscribers: Restricted Project, kristof.beyls. · View Herald Transcript

Unit tests: pass. 62433 tests passed, 0 failed and 845 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

cryptoad accepted this revision.Feb 4 2020, 9:02 AM
This revision is now accepted and ready to land.Feb 4 2020, 9:02 AM
This revision was automatically updated to reflect the committed changes.