aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data/basicBlocksWithBackJump.qml
Commit message (Collapse)AuthorAgeFilesLines
* Compiler: Separate function prolog block and add validation of blocksOlivier De Cannière2023-08-041-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function prolog logic is now separated in its own basic block. The first "real" block with user code starts at offset 0. Having the function prolog as a hidden part of the first block caused some inconsistencies in block generation and would create empty blocks. This happened for example when a back edge of a loop would target offset 0 in code where a loop condition is the very first set of instructions that are run. This is because the target block offset didn't exist due to it being part of the hidden prolog block. Validation for the basic blocks was also added. This checks for three things at the moment: 1. That return and throw blocks don't have jump targets. 2. That the basic blocks graph is connected. 3. That jump targets are the first offset of a block. Test tst_QmlCppCodegen::basicBlocksWithBackJump_infinite() is expected to fail because it contains an infinite loop and the basic blocks that are generated for it are inconsistent due to dead-code elimination happening earlier in compilation. Debug outputs for dumping basic blocks were also adapted to reflect these changes. Change-Id: I513f73856412d488d443c2b47a052b0023d45496 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Properly reset before re-running basic blocks passUlf Hermann2023-06-211-0/+42
If we were within dead code at the end of the previous run we need to reset the "skip until next label" flag. Otherwise we still assume we're in dead code at the beginning of the function, with interesting effects. Pick-to: 6.5 6.6 Fixes: QTBUG-114476 Change-Id: Ib6e3d6c81aad4c8aaac12accdb3936e4136235fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>