diff options
author | Nikita Popov <nikic@php.net> | 2016-05-12 21:41:24 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2016-05-12 22:08:28 +0200 |
commit | b1c3c9a525763ae9cd6e599bf061d7114d48aab0 (patch) | |
tree | 0d430950f0f8fd848b1977ca34b95b7fc4957053 /Zend/zend_bitset.h | |
parent | aea0d577f9b745a851aed1389146a9ab9c6a3d4b (diff) | |
download | php-git-b1c3c9a525763ae9cd6e599bf061d7114d48aab0.tar.gz |
Explicitly construct phi set during def propagation
Previously the phi set was first computed during def propagation
and then computed again (per-block) during actual phi placement.
This commit changes this to store the phi set computed during
def propagation.
This makes SSA construction slightly faster (5%), but the main
purpose here is to pave the way for the next commit.
This also fixes a potential issue with the handling of irreducible
loops -- they generated additional phis, but these were not
accounted for in def propagation. (Though I'm not sure if we can
even have any irreducible loops right now.)
Diffstat (limited to 'Zend/zend_bitset.h')
-rw-r--r-- | Zend/zend_bitset.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/zend_bitset.h b/Zend/zend_bitset.h index fb19b54329..e1a95466b8 100644 --- a/Zend/zend_bitset.h +++ b/Zend/zend_bitset.h @@ -137,6 +137,18 @@ static inline void zend_bitset_union_with_difference(zend_bitset set1, zend_bits } } +static inline zend_bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len) +{ + uint32_t i; + + for (i = 0; i < len; i++) { + if (set1[i] & ~set2[i]) { + return 0; + } + } + return 1; +} + static inline int zend_bitset_first(zend_bitset set, uint32_t len) { uint32_t i; |