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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
include/llvm/IR/Value.def | ||
---|---|---|
59–60 | Consant -> Constant |
Comment Actions
Adding pete to the list of subscribers, as accordning to `svn log` he's the original author of the file.
Comment Actions
lgtm
I checked, and we wrap this enum in our C API, so there should be no ABI concerns here. See LLVMValueKind LLVMGetValueKind(LLVMValueRef Val) in IR/Core.cpp.
Comment Actions
Mmmh, build failing due to a funny warning that illustrates the optimization, see http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/3012/steps/build-unified-tree/logs/stdio. Update in r318087.
Consant -> Constant