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)
commit25cbe525ef1b18855d1ec67a1724f965c62b3e9c
tree5651c764faf81da2b77e2cfacc4e1fbce644bd34
parentc691d4eef25bfa9815366dad64fbefb06ba6ffb7
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

llvm-svn: 318083
llvm/include/llvm/IR/Value.def