llvm-6502/lib/Transforms
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
..
Hello [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 09:10:37 +00:00
InstCombine [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
Instrumentation IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
IPO Move duplicated code into a helper function (exposed through overload). 2014-03-12 16:12:36 +00:00
ObjCARC [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
Scalar Fix crash in PRE. 2014-03-11 15:07:32 +00:00
Utils Cloning a function now also clones its debug metadata if 'ModuleLevelChanges' is true. 2014-03-12 14:42:51 +00:00
Vectorize Fix build break. 2014-03-09 03:50:36 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile