Closed
Bug 939824
Opened 11 years ago
Closed 11 years ago
Factor out the backtracking allocator's splitting logic
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: sunfish, Assigned: sunfish)
References
Details
(Whiteboard: [qa-])
Attachments
(3 files, 2 obsolete files)
9.09 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
5.12 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
2.73 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
The backtracking allocator has several different splitting methods: trySplitAcrossHotcode, trySplitAfterLastRegisterUse, and splitAcrossCalls, and there is a fair amount of code which is common between them which could be factored out. It would also help the development of new splitting heuristics to avoid needing to re-implement a lot of the mechanics.
Assignee | ||
Comment 1•11 years ago
|
||
This patch improves up the new splitAt routine to avoid splitting the LiveInterval at range boundaries. This is a minor optimization, at it reduces unnecessary spilling at range boundaries.
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8333892 -
Attachment is obsolete: true
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8333893 -
Attachment is obsolete: true
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8333892 [details] [diff] [review]
regalloc-refactor-splitat.patch
This patch separates most of the mechanism from the policy of trySplitAcrossCalls.
Attachment #8333892 -
Flags: review?(bhackett1024)
Assignee | ||
Updated•11 years ago
|
Attachment #8333892 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 8336050 [details] [diff] [review]
regalloc-refactor-splitat.patch
Oops, here is the updated version of the patch.
Attachment #8336050 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8336051 [details] [diff] [review]
regalloc-splitat-nicely.patch
Previously, this code created new LiveIntervals at every Range boundary, which led to unnecessary spilling. This patch introduces new LiveIntervals only at the specified split points.
Attachment #8336051 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 7•11 years ago
|
||
This patch converts trySplitAcrossHotcode to use the new splitAt, which is a nice demonstration of its utility.
Attachment #8336083 -
Flags: review?(bhackett1024)
Comment 8•11 years ago
|
||
Comment on attachment 8336050 [details] [diff] [review]
regalloc-refactor-splitat.patch
Review of attachment 8336050 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
::: js/src/jit/BacktrackingAllocator.cpp
@@ +1715,5 @@
> }
>
> +// Find the next split position after the current position.
> +static size_t NextSplitPosition(size_t activeSplitPosition,
> + const Vector<CodePosition, 4, SystemAllocPolicy> &splitPositions,
This Vector<...> (and, generally, any Vector<...> that otherwise would have to be typed twice) should be a typedef.
Attachment #8336050 -
Flags: review?(bhackett1024) → review+
Updated•11 years ago
|
Attachment #8336051 -
Flags: review?(bhackett1024) → review+
Updated•11 years ago
|
Attachment #8336083 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Brian Hackett (:bhackett) from comment #8)
> Comment on attachment 8336050 [details] [diff] [review]
> regalloc-refactor-splitat.patch
>
> Review of attachment 8336050 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Thanks!
Thanks for the reviews!
> ::: js/src/jit/BacktrackingAllocator.cpp
> @@ +1715,5 @@
> > }
> >
> > +// Find the next split position after the current position.
> > +static size_t NextSplitPosition(size_t activeSplitPosition,
> > + const Vector<CodePosition, 4, SystemAllocPolicy> &splitPositions,
>
> This Vector<...> (and, generally, any Vector<...> that otherwise would have
> to be typed twice) should be a typedef.
Ok. Typedef added and code updated to use it.
https://hg.mozilla.org/integration/mozilla-inbound/rev/f3333afffd24
https://hg.mozilla.org/integration/mozilla-inbound/rev/01333a597b9a
https://hg.mozilla.org/integration/mozilla-inbound/rev/2dc657af3475
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f3333afffd24
https://hg.mozilla.org/mozilla-central/rev/01333a597b9a
https://hg.mozilla.org/mozilla-central/rev/2dc657af3475
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•