IonMonkey: Populate safepoints directly in backtracking allocator

RESOLVED FIXED in mozilla20

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bhackett, Unassigned)

Tracking

Other Branch
mozilla20
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 696522 [details] [diff] [review]
patch

Currently, the backtracking allocator uses the AllocationIntegrityState to compute the live registers and stack slots for each safepoint.  This was done for simplicity while developing the allocator, but slows down the allocator tremendously and needs to be fixed.  The backtracking allocator currently takes several times as long as LSRA (6x on v8-v7); cutting the use of AllocationIntegrityState reduces time so that backtracking is 1.5x to 2x slower than LSRA.
Attachment #696522 - Flags: review?(jdemooij)

Updated

5 years ago
Blocks: 825440

Updated

5 years ago
No longer blocks: 825440
Comment on attachment 696522 [details] [diff] [review]
patch

Review of attachment 696522 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/ion/BacktrackingAllocator.cpp
@@ +1046,5 @@
> +            break;
> +
> +        // Find the furthest endpoint.
> +        size_t lastInterval = reg->numIntervals() - 1;
> +        CodePosition end = reg->getInterval(lastInterval)->end();

Intervals used by the backtracking allocator can overlap right? Is the first interval still guaranteed to start before all other intervals, and the last interval ends after all other intervals? Maybe add a comment/assert.
Attachment #696522 - Flags: review?(jdemooij) → review+
(Reporter)

Comment 2

5 years ago
Good catch, yeah, that could cause safepoints to not be fully populated.

https://hg.mozilla.org/integration/mozilla-inbound/rev/663bfe4a4c2c
https://hg.mozilla.org/mozilla-central/rev/663bfe4a4c2c
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.