Reorder Type fields to make various isa< > check more concise
authorserge-sans-paille <sguelton@redhat.com>
Tue, 12 May 2020 16:46:32 +0000 (18:46 +0200)
committerserge-sans-paille <sguelton@redhat.com>
Mon, 18 May 2020 12:23:52 +0000 (14:23 +0200)
commitab1fb38d8fe8055ddfb2e5a7ae1b1824b3f3cab7
treeed768e5fa237777e0b871059bfb8ce3b930ab015
parentc579ab9962b10d275ebd951657414a479bd7acab
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
llvm/include/llvm/IR/Type.h