diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-12-08 16:36:37 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-12-08 16:36:37 +0000 |
commit | 9fcb91b3eb1b90d9c4859a2011d6eb8cc606eb78 (patch) | |
tree | f845957fa56c260aa5589f7b36cae14d9ccc036f /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 4ba3314d55a6076830f31c09761b471ebba02e16 (diff) | |
download | bcm5719-llvm-9fcb91b3eb1b90d9c4859a2011d6eb8cc606eb78.tar.gz bcm5719-llvm-9fcb91b3eb1b90d9c4859a2011d6eb8cc606eb78.zip |
[scudo] Minor code generation improvement
Summary:
It looks like clang was generating somewhat weird assembly with the current
code. `FromPrimary`, even though `const`, was replaced every time with the code
generated for `size <= SizeClassMap::kMaxSize` instead of using a variable or
register, and `FromPrimary` didn't induce `ClassId != 0` for the compiler, so a
dead branch was generated for `getActuallyAllocatedSize(Ptr, ClassId)` since
it's never called for `ClassId = 0` (Secondary backed allocations) [this one
was more wishful thinking on my side than anything else].
I rearranged the code bit so that the generated assembly is less clunky.
Also changed 2 whitespace inconsistencies that were bothering me.
Reviewers: alekseyshl, flowerhack
Reviewed By: flowerhack
Subscribers: llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D40976
llvm-svn: 320160
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions