zend_optimizer.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend OPcache |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1998-2016 The PHP Group |
  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. +----------------------------------------------------------------------+
  15. | Authors: Andi Gutmans <andi@zend.com> |
  16. | Zeev Suraski <zeev@zend.com> |
  17. | Stanislav Malyshev <stas@zend.com> |
  18. | Dmitry Stogov <dmitry@zend.com> |
  19. +----------------------------------------------------------------------+
  20. */
  21. #ifndef ZEND_OPTIMIZER_H
  22. #define ZEND_OPTIMIZER_H
  23. #include "zend.h"
  24. #include "zend_compile.h"
  25. #define ZEND_OPTIMIZER_PASS_1 (1<<0) /* CSE, STRING construction */
  26. #define ZEND_OPTIMIZER_PASS_2 (1<<1) /* Constant conversion and jumps */
  27. #define ZEND_OPTIMIZER_PASS_3 (1<<2) /* ++, +=, series of jumps */
  28. #define ZEND_OPTIMIZER_PASS_4 (1<<3) /* INIT_FCALL_BY_NAME -> DO_FCALL */
  29. #define ZEND_OPTIMIZER_PASS_5 (1<<4) /* CFG based optimization */
  30. #define ZEND_OPTIMIZER_PASS_6 (1<<5)
  31. #define ZEND_OPTIMIZER_PASS_7 (1<<6)
  32. #define ZEND_OPTIMIZER_PASS_8 (1<<7)
  33. #define ZEND_OPTIMIZER_PASS_9 (1<<8) /* TMP VAR usage */
  34. #define ZEND_OPTIMIZER_PASS_10 (1<<9) /* NOP removal */
  35. #define ZEND_OPTIMIZER_PASS_11 (1<<10) /* Merge equal constants */
  36. #define ZEND_OPTIMIZER_PASS_12 (1<<11)
  37. #define ZEND_OPTIMIZER_PASS_13 (1<<12)
  38. #define ZEND_OPTIMIZER_PASS_14 (1<<13)
  39. #define ZEND_OPTIMIZER_PASS_15 (1<<14) /* Collect constants */
  40. #define ZEND_OPTIMIZER_ALL_PASSES 0x7FFFFFFF
  41. #define DEFAULT_OPTIMIZATION_LEVEL "0x7FFFBFFF"
  42. #endif