zend_dfg.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend Engine, DFG - Data Flow Graph |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1998-2018 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: Dmitry Stogov <dmitry@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef ZEND_DFG_H
  19. #define ZEND_DFG_H
  20. #include "zend_bitset.h"
  21. #include "zend_cfg.h"
  22. typedef struct _zend_dfg {
  23. int vars;
  24. uint32_t size;
  25. zend_bitset tmp;
  26. zend_bitset def;
  27. zend_bitset use;
  28. zend_bitset in;
  29. zend_bitset out;
  30. } zend_dfg;
  31. #define DFG_BITSET(set, set_size, block_num) \
  32. ((set) + ((block_num) * (set_size)))
  33. #define DFG_SET(set, set_size, block_num, var_num) \
  34. zend_bitset_incl(DFG_BITSET(set, set_size, block_num), (var_num))
  35. #define DFG_ISSET(set, set_size, block_num, var_num) \
  36. zend_bitset_in(DFG_BITSET(set, set_size, block_num), (var_num))
  37. BEGIN_EXTERN_C()
  38. int zend_build_dfg(const zend_op_array *op_array, const zend_cfg *cfg, zend_dfg *dfg, uint32_t build_flags);
  39. END_EXTERN_C()
  40. #endif /* ZEND_DFG_H */
  41. /*
  42. * Local variables:
  43. * tab-width: 4
  44. * c-basic-offset: 4
  45. * indent-tabs-mode: t
  46. * End:
  47. */