[GlobalMerge] Take into account minsize on Global users' parents.

Now that we can look at users, we can trivially do this: when we would
have otherwise disabled GlobalMerge (currently -O<3), we can just run
it for minsize functions, as it's usually a codesize win.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239087 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ahmed Bougacha
2015-06-04 20:39:23 +00:00
parent 3eb860ab87
commit 0d9335eda7
5 changed files with 113 additions and 11 deletions

View File

@@ -152,7 +152,14 @@ Pass *createLoopInterchangePass();
//
Pass *createLoopStrengthReducePass();
Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset);
//===----------------------------------------------------------------------===//
//
// GlobalMerge - This pass merges internal (by default) globals into structs
// to enable reuse of a base pointer by indexed addressing modes.
// It can also be configured to focus on size optimizations only.
//
Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset,
bool OnlyOptimizeForSize = false);
//===----------------------------------------------------------------------===//
//