1 //===-- llvm/Support/PassManagerUtils.h -------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file provides interface to pass manager utilities.
12 //===----------------------------------------------------------------------===//
16 class FunctionPassManager;
19 /// AddOptimizationPasses - This routine adds optimization passes
20 /// based on selected optimization level, OptLevel. This routine is
21 /// used by llvm-gcc and other tools.
23 /// OptLevel - Optimization Level
24 /// EnableIPO - Enables IPO passes. llvm-gcc enables this when
25 /// flag_unit_at_a_time is set.
26 /// InlinerSelection - 1 : Add function inliner.
27 /// - 2 : Add AlwaysInliner.
28 /// OptLibCalls - Simplify lib calls, if set.
29 /// PruneEH - Add PruneEHPass, if set.
30 /// UnrollLoop - Unroll loops, if set.
31 void AddOptimizationPasses(FunctionPassManager &FPM, PassManager &MPM,
32 unsigned OptLevel, bool EnableIPO,
33 unsigned InlinerSelection, bool OptLibCalls,
34 bool PruneEH, bool UnrollLoop);