llvm-6502/tools/opt
Eli Bendersky ce306f9f99 Move duplicated code into a helper function (exposed through overload).
There's a bit of duplicated "magic" code in opt.cpp and Clang's CodeGen that
computes the inliner threshold from opt level and size opt level.

This patch moves the code to a function that lives alongside the inliner itself,
providing a convenient overload to the inliner creation.

A separate patch can be committed to Clang to use this once it's committed to
LLVM. Standalone tools that use the inlining pass can also avoid duplicating
this code and fearing it will go out of sync.

Note: this patch also restructures the conditinal logic of the computation to
be cleaner.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203669 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-12 16:12:36 +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 [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +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 [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen. 2014-02-22 00:07:45 +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 [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen. 2014-02-22 00:07:45 +00:00
Makefile [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen. 2014-02-22 00:07:45 +00:00
NewPMDriver.cpp [PM] Add a new "lazy" call graph analysis pass for the new pass manager. 2014-02-06 04:37:03 +00:00
NewPMDriver.h [PM] Wire up the Verifier for the new pass manager and connect it to the 2014-01-20 11:34:08 +00:00
opt.cpp Move duplicated code into a helper function (exposed through overload). 2014-03-12 16:12:36 +00:00
Passes.cpp [PM] Switch new pass manager from polymorphic_ptr to unique_ptr now that 2014-03-09 11:49:53 +00:00
Passes.h [PM] Wire up the Verifier for the new pass manager and connect it to the 2014-01-20 11:34:08 +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 [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00