Simplify region selector/pgo options, fix pgo for legacy/tracelet selectors
[hiphop-php.git] / hphp / runtime / vm / jit / opt.h
blobbb421817e8cd69ac54c49d98ee0e1b4ea89222c6
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
16 #ifndef incl_HPHP_HHIR_OPT_H_
17 #define incl_HPHP_HHIR_OPT_H_
19 #include "hphp/runtime/vm/jit/types.h"
21 namespace HPHP { namespace JIT {
23 //////////////////////////////////////////////////////////////////////
25 class TraceBuilder;
26 class IRUnit;
27 class IRInstruction;
29 //////////////////////////////////////////////////////////////////////
32 * The main optimization passes, in the order they run.
34 void optimizeRefcounts(IRUnit&) noexcept;
35 void optimizePredictions(IRUnit&);
36 void optimizeJumps(IRUnit&);
37 void eliminateDeadCode(IRUnit&);
40 * Run all the optimization passes.
42 void optimize(IRUnit& unit, TraceBuilder& builder, TransKind kind);
44 //////////////////////////////////////////////////////////////////////
48 #endif