[all-commits] [llvm/llvm-project] c95598: [scudo][standalone] Simplify populateFreelist

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Fri Nov 6 09:45:04 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c95598904633140275116c3f18ad10be0062eb6d
      https://github.com/llvm/llvm-project/commit/c95598904633140275116c3f18ad10be0062eb6d
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2020-11-06 (Fri, 06 Nov 2020)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/primary32.h
    M compiler-rt/lib/scudo/standalone/primary64.h

  Log Message:
  -----------
  [scudo][standalone] Simplify populateFreelist

`populateFreelist` was more complicated that it needed to be. We used
to call to `populateBatches` that would do some internal shuffling and
add pointers one by one to the batches, but ultimately this was not
needed. We can get rid of `populateBatches`, and do processing in
bulk. This doesn't necessarily make things faster as this is not on the
hot path, but it makes the function cleaner.

Additionally clean up a couple of items, like `UNLIKELY`s and setting
`Exhausted` to `false` which can't happen.

Differential Revision: https://reviews.llvm.org/D90700




More information about the All-commits mailing list