Commit graph

10 commits

Author SHA1 Message Date
Nikita Popov
4543cd32ae Remove JMPZNZ opcode
While JMPZNZ can avoid execution of a separate JMP opcode in some
cases, it also prevents smart branch optimization, so creating
JMPZNZ may actually have a negative effect. It also adds additional
complexity for optimizations.

Drop JMPZNZ in favor of JMPZ+JMP or JMPNZ+JMP.

Closes GH-7857.
2022-01-10 22:07:10 +01:00
Nikita Popov
0698bf794f Add helper for convertion to CHECK_VAR/FREE/NOP
This is a recurring pattern whenever an instruction with an
operand is deleted.
2021-12-30 12:44:57 +01:00
Nikita Popov
7d2f2a1005 Remove an incorrect JMPZNZ optimization
This is already skipped for TMP/VAR, but also needs to be skipped
for CV, because we need to insert CHECK_VAR in that case, if we're
being pedantic. That leaves us with CONST as the only case
we can handle, which is already covered by constant folding.

This optimization never actually triggers in our tests, so it's
not a big loss.
2021-12-30 12:06:19 +01:00
Nikita Popov
2dd61521f2 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix relative offsets when copying JMPZNZ
2021-09-27 16:20:21 +02:00
Nikita Popov
0015fc9a8e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix relative offsets when copying JMPZNZ
2021-09-27 16:20:04 +02:00
George Peter Banyard
53d5420d49 Use more appropriate types in Optimizer
Mainly using zend_result and bool instead of int
2021-09-21 11:35:53 +01:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
b82242a88d Remove unnecessary php.h includes from Zend/
The Zend/ directory really shouldn't be including php headers.
These particular includes are plain unnecessary.
2021-04-20 12:21:45 +02:00
Josh Soref
462da6e09c Fix spelling and grammar mistakes
This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.
2021-04-13 12:09:37 +02:00
Nikita Popov
83be073abe Move optimizer into core
This only moves the files, adjusts the build system, exports APIs
and does minor fixups to make sure the code builds.

This does not yet try to make the optimizer usable independently
of opcache.

Closes GH-6642.
2021-01-28 10:38:25 +01:00
Renamed from ext/opcache/Optimizer/pass3.c (Browse further)