[llvm-commits] [gcc-plugin] r80110 - /gcc-plugin/trunk/llvm-backend.cpp
Duncan Sands
baldrick at free.fr
Wed Aug 26 09:50:22 PDT 2009
Author: baldrick
Date: Wed Aug 26 11:50:22 2009
New Revision: 80110
URL: http://llvm.org/viewvc/llvm-project?rev=80110&view=rev
Log:
Remove flag_inline_trees as in gcc mainline,
where it was replaced with the constant value 2
everywhere in commit 138140.
Modified:
gcc-plugin/trunk/llvm-backend.cpp
Modified: gcc-plugin/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=80110&r1=80109&r2=80110&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-backend.cpp (original)
+++ gcc-plugin/trunk/llvm-backend.cpp Wed Aug 26 11:50:22 2009
@@ -115,7 +115,6 @@
static bool DisableLLVMOptimizations = false;//TODO
static bool emit_llvm = false;//TODO
static bool emit_llvm_bc = false;//TODO
-static int flag_inline_trees = 2;//TODO
std::vector<std::pair<Constant*, int> > StaticCtors, StaticDtors;
SmallSetVector<Constant*, 32> AttributeUsedGlobals;
@@ -787,23 +786,8 @@
bool HasPerModulePasses = false;
if (!DisableLLVMOptimizations) {
- bool NeedAlwaysInliner = false;
- llvm::Pass *InliningPass = 0;
- if (flag_inline_trees > 1) { // respect -fno-inline-functions
- InliningPass = createFunctionInliningPass(); // Inline small functions
- } else {
- // If full inliner is not run, check if always-inline is needed to handle
- // functions that are marked as always_inline.
- for (Module::iterator I = TheModule->begin(), E = TheModule->end();
- I != E; ++I)
- if (I->hasFnAttr(Attribute::AlwaysInline)) {
- NeedAlwaysInliner = true;
- break;
- }
-
- if (NeedAlwaysInliner)
- InliningPass = createAlwaysInlinerPass(); // Inline always_inline funcs
- }
+ // Inline small functions.
+ llvm::Pass *InliningPass = createFunctionInliningPass();
HasPerModulePasses = true;
createStandardModulePasses(PerModulePasses, optimize,
More information about the llvm-commits
mailing list