1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/tools/opt
Mehdi Amini 96b6ab7056 Add a flag to the LLVMContext to disable name for Value other than GlobalValue
Summary:
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.

Compared to a compile-time flag (like the IRBuilder one), it performs
very close. I profiled on SROA and obtain these results:

 420ms with IRBuilder that preserve name
 372ms with IRBuilder that strip name
 375ms with IRBuilder that preserve name, and a runtime flag to strip

Reviewers: chandlerc, dexonsmith, bogner

Subscribers: joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D17946

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263086
2016-03-10 01:28:54 +00:00
..
AnalysisWrappers.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
BreakpointPrinter.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
BreakpointPrinter.h Move more self-contained functionality away from tools/opt/opt.cpp 2014-02-12 16:48:02 +00:00
CMakeLists.txt [PM/AA] Remove the last relics of the separate IPA library from LLVM, 2015-08-18 17:51:53 +00:00
GraphPrinters.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
NewPMDriver.cpp PM: Implement a basic loop pass manager 2016-02-25 07:23:08 +00:00
NewPMDriver.h uselistorder: Pull the bit through PrintModulePass 2015-04-15 02:38:06 +00:00
opt.cpp Add a flag to the LLVMContext to disable name for Value other than GlobalValue 2016-03-10 01:28:54 +00:00
PassPrinters.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
PassPrinters.h Move the *PassPrinter into their own module. 2014-02-10 23:34:23 +00:00
PrintSCC.cpp SCC: Change clients to use const, NFC 2014-04-25 18:24:50 +00:00