[all-commits] [llvm/llvm-project] ab1fb3: Reorder Type fields to make various isa< > check m...

serge-sans-paille via All-commits all-commits at lists.llvm.org
Mon May 18 05:24:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ab1fb38d8fe8055ddfb2e5a7ae1b1824b3f3cab7
      https://github.com/llvm/llvm-project/commit/ab1fb38d8fe8055ddfb2e5a7ae1b1824b3f3cab7
  Author: serge-sans-paille <sguelton at redhat.com>
  Date:   2020-05-18 (Mon, 18 May 2020)

  Changed paths:
    M llvm/include/llvm/IR/Type.h

  Log Message:
  -----------
  Reorder Type fields to make various isa< > check more concise

Depending on the order of fields, some isa < > checks can be faster because of
tests that check a range of type, leading to assembly simplification.

To find a relevant ordering, I... brute-forced the permutation among the derived
types and pick the combination that resulted in the smallest libLLVM-11.so.

On my laptop (x86_64), this reduces the size of libLLVM-11.so from 127344064 bytes to 127335336,
that's 8728 bytes shaved without much effort.

Also removed obsolete comments in the process.

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




More information about the All-commits mailing list