mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 1919246 - Back out D221953 and add tests. r=mgaudet
For now back out D221953 because it was an optional change to improve codegen a bit for loops that contain an OSR loop, but it's probably not worth the complexity to try to handle this. Differential Revision: https://phabricator.services.mozilla.com/D222486
This commit is contained in:
parent
dcde9b59c1
commit
3b81464999
13
js/src/jit-test/tests/ion/bug1919246-1.js
Normal file
13
js/src/jit-test/tests/ion/bug1919246-1.js
Normal file
@ -0,0 +1,13 @@
|
||||
// |jit-test| --fast-warmup
|
||||
function test() {
|
||||
var c = [1];
|
||||
for (var d in c) {
|
||||
for (var i = 0; i < 30; i++) {
|
||||
try {
|
||||
a.push(g);
|
||||
} catch (e) { }
|
||||
for (var j = 0; j < 30; j++) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
test();
|
12
js/src/jit-test/tests/ion/bug1919246-2.js
Normal file
12
js/src/jit-test/tests/ion/bug1919246-2.js
Normal file
@ -0,0 +1,12 @@
|
||||
// |jit-test| --fast-warmup
|
||||
function f() {
|
||||
var i = 0;
|
||||
while (true) {
|
||||
for (let a = 2; a;) {
|
||||
for (c = 0; c < 10;) {
|
||||
if (i++ > 2500) return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
f();
|
@ -5081,6 +5081,13 @@ bool jit::MakeLoopsContiguous(MIRGraph& graph) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// If there's an OSR block entering the loop in the middle, it's tricky,
|
||||
// so don't try to handle it, for now.
|
||||
if (canOsr) {
|
||||
UnmarkLoopBlocks(graph, header);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Move all blocks between header and backedge that aren't marked to
|
||||
// the end of the loop, making the loop itself contiguous.
|
||||
MakeLoopContiguous(graph, header, numMarked);
|
||||
|
Loading…
x
Reference in New Issue
Block a user