llvm-6502/tools
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
..
bugpoint [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
bugpoint-passes [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
gold Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llc Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
lli [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-ar Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-as Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-bcanalyzer Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-c-test Use -std=gnu99 in tools/llvm-c-test/CMakeLists.txt 2014-01-08 11:48:19 +00:00
llvm-config Don't emit a blank line when running llvm-config --system-libs. 2014-03-03 15:06:14 +00:00
llvm-cov Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-diff [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-dis [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-dwarfdump Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-extract Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-jitlistener Support: split object format out of environment 2014-03-06 20:47:11 +00:00
llvm-link Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-lto Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-mc [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-mcmarkup Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-nm Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-objdump Change MCDisassembler::setSymbolizer to take unique_ptr by value. 2014-03-07 09:38:02 +00:00
llvm-profdata Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-readobj Object: rename ARMV7 to ARMNT 2014-03-11 03:08:37 +00:00
llvm-rtdyld [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-shlib Add patch level to llvm version in CMake and Autoconf 2014-03-03 15:22:00 +00:00
llvm-size Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
llvm-stress [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-08 08:27:28 +00:00
llvm-symbolizer Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
lto Centralize the handling of install_name and rpath. 2014-02-28 13:48:03 +00:00
macho-dump Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
msbuild MSBuild integration: get the LibraryPath right (PR18707) 2014-02-13 22:01:35 +00:00
obj2yaml Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
opt Move duplicated code into a helper function (exposed through overload). 2014-03-12 16:12:36 +00:00
yaml2obj Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
CMakeLists.txt fix polly buildbot 2014-03-10 21:27:04 +00:00
LLVMBuild.txt PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00
Makefile PGO: llvm-profdata: tool for merging profiles 2014-02-17 23:22:49 +00:00