OSDN Git Service

Reorder Value.def to optimize code size
authorSerge Guelton <sguelton@quarkslab.com>
Mon, 13 Nov 2017 20:57:40 +0000 (20:57 +0000)
committerSerge Guelton <sguelton@quarkslab.com>
Mon, 13 Nov 2017 20:57:40 +0000 (20:57 +0000)
commit1fd16115657943ee637d1cde29b0d97811fa95f4
treeb4e6cf70c14e8709f3b114de6007605bee7bbe40
parentfbb029c5bbfbc7627d703014d28dd391cf420806
Reorder Value.def to optimize code size

If the first values in Value.def is the range of constant, then the code
generated by `isa<Constant>` is smaller by one operation (basically, an add is
removed). It turns out this small optimization reduces the size of the
statically linked clang binary by 400ko on my laptop. The theoritical
performance gain is non visible from my benchmarks, but the size dropdown is.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318083 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Value.def