[PATCH] D17946: Add a flag to the LLVMContext to disable name for Value other than GlobalValue

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 16:07:34 PST 2016


joker.eph created this revision.
joker.eph added reviewers: chandlerc, dexonsmith, bogner.
joker.eph added a subscriber: llvm-commits.
Herald added a subscriber: joker.eph.

This is intended to be a performance flag, on the same level as clang
cc1 option "--disable-free". LLVM will never initialize it by default,
it will be up to the client creating the LLVMContext to request this
behavior. Clang will do it by default in Release build (just like
--disable-free).

"opt" and "llc" can opt-in using -disable-named-value command line
option.

When performing LTO on llvm-tblgen, the initial merging of IR peaks
at 92MB without this patch, and 86MB after this patch,setNameImpl()
drops from 6.5MB to 0.5MB.
The total link time goes from ~29.5s to ~27.8s.

http://reviews.llvm.org/D17946

Files:
  include/llvm/IR/LLVMContext.h
  lib/AsmParser/LLParser.cpp
  lib/IR/LLVMContext.cpp
  lib/IR/LLVMContextImpl.h
  lib/IR/Value.cpp
  lib/LTO/LTOCodeGenerator.cpp
  test/Feature/strip_names.ll
  tools/llc/llc.cpp
  tools/opt/opt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17946.50007.patch
Type: text/x-patch
Size: 5614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160308/72f85ec0/attachment.bin>


More information about the llvm-commits mailing list