aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa_p.h
Commit message (Collapse)AuthorAgeFilesLines
* V4: fix range splitting when split is between intervals.Erik Verbruggen2014-01-171-1/+15
| | | | | | | | | | | Also added some "white-box" unit tests and sprinkled in a bit of documentation. The case that went wrong is covered by the test rangeSplitting_1: before the fix, the new interval would have two ranges: [66-64],[70-71]. The first range is invalid and should not be there at all. Change-Id: If0742f4e6a96d98ea5d696f95126886ba66f92bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4: lower memory allocator pressure.Erik Verbruggen2014-01-161-0/+1
| | | | | | | | | | | | | Changes to datastructures and more re-using of locally used temporary vectors. For the test regress-74474-002.js this lowers the total allocated memory from 1.98GB to 158MB. Thse peak memory usage stays at 75MB. There is no functional change. This should give a modest performance improvement which mainly depends on the speed of malloc()/free(). Change-Id: I1877c1903e59a33ee79ff2b801ef6f2c1cee30a6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4: remove unnecessary spills and order them correctly.Erik Verbruggen2014-01-161-2/+3
| | | | | | | | | | | | | | | | | | | When doing edge resolving, too many spills were generated, and the dependency tracking of moves was not complete. Now we only insert spills that are caused by phi-nodes (because any other spill would be generated at the point a variable was defined). However, there can still be multiple dependencies between the moves generated by the edge resolving. Instead of only checking the first dependency, all of them are tracked. The bug report was a case where an unneccesary spill was generated, that got tracked, but "suppressed" the other (valid!) dependent move. The randomness was caused by the hash seeding of QHash. Task-number: QTBUG-35840 Change-Id: Ifbc3c8fc13de53c46a8b5859721b2497189921a3 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Improve type interference for QObject propertiesSimon Hausmann2013-11-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Propagate QObject properties in member expressions across temporaries as part of the type interference SSA pass. This replaces the earlier attempt to resolving QObject properties in fieldMemberExpression() in the codegen, but it was incomplete and now things like the following are fully resolved: var tmp = blah.somePropertyThatReturnsAQQuickItem; <-- QQuickItem property return type propagated into tmp var width = tmp.width; <-- and picked up here again to resolve the index of width instead of by name With this patch Temp gets a helper structure with a function pointer, initialized to aid the resolution of properties in Qt meta objects. This structure is propagated into the temps until it reaches the next member expression that uses the temp. Similarly QObjectType is added as IR type, next to VarType. The resolution inside the SSA type interference pass also requires passing through the QQmlEngine from the upper caller levels, in order to resolve the property type to a potential QMetaObject property. Change-Id: I14c98fa455db57603da46613ce49c174d0944291 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix a bug in LifetimeInterval:covers()Lars Knoll2013-11-041-3/+1
| | | | | Change-Id: I7c3b0b2ac43462a9834e3f1891dae23fc9ed061d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* V4: Remove more jumps.Erik Verbruggen2013-10-101-0/+2
| | | | | | | | | | | | | | | | | | | | | Do not generate jump instructions when the target immediately follows the current basic block, even if there are intermediate jumps in between as long as they jump to the same basic block. In the IR snippet below, no jumps will be generated at all. … L8: goto L6; L12: goto L6; L6: goto L4; L11: goto L4; L4: goto L2; L10: goto L2; L2: …. Before this change, the gotos in L8, L6, and L2 were still generated. Change-Id: I718ed0d41c603a6905f2279b782cd9e9cafb7d55 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use a QVector instead of a QListLars Knoll2013-10-031-2/+7
| | | | | | | | This makes the code go quite a bit faster (saves ~7-8% of the total amount of instructions executed when running crypto.js Change-Id: I6b3bd08eca98b45593262e2fc6e0ce5056257e76 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 SSA: change life-time interval coverage calculation.Erik Verbruggen2013-09-251-1/+9
| | | | | | | | When iterating over the ranges in a life-time interval, stop when the range starts after the position to check. Change-Id: Ib64cbfc644820fdb4c0167b8db0b40dacfb5d076 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4: fix move mappingErik Verbruggen2013-09-251-1/+1
| | | | | | | | | | | | When resolving conflicting register use between basic blocks, only insert the resolving moves into the successor when it has one incoming edge. Because of the absence of critical edges, this implies that it is also save to insert those moves into the predecessor block if there is more than one incoming edge (the predecessor will only have one outgoing edge). Change-Id: I83c41b4ca86946d3aa09619f20ddab3e692136f2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4: Fix SSA decomposition when no regalloc is used.Erik Verbruggen2013-09-131-13/+33
| | | | | | | | | Add scheduling for moves generated by removing phi nodes by re-using the MoveMapping class from the register allocator. This change applies to both the JIT when no register allocator is used, and the interpreter. Change-Id: I38eac5b13759c7790132d1ef07fa17fcb53187e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add linear scan register allocation.Erik Verbruggen2013-08-191-8/+42
| | | | | | | | Currently disabled for all platforms. Will be enabled step-by-step when specific platforms get supported. Change-Id: I144c6c991b1666e1ff752d776bca0a7b57a4fe7c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Restructure source codeLars Knoll2013-08-081-0/+127
Move the v4 engine classes from a subdir of qml/qml into two subdirs (compiler and jsruntime) of the qml module Remove an unsued qv4syntaxchecker class, and move the moth code directly into compiler. Change-Id: I6929bede1f25098e6cb2e68087e779fac16b0c68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>