Closed Bug 677832 Opened 13 years ago Closed 13 years ago

IonMonkey: Linear scan register allocator mishandles loop liveness due to block ordering

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: adrake, Assigned: adrake)

References

Details

Attachments

(1 file)

The loop fixup in liveness analysis assumed that blocks in a loop were contiguous, which turns out to be incorrect. This uses a precise graph walk to find all blocks in the loop, and additionally fixes up their liveIn sets.
Attached patch Patch v0Splinter Review
This is a bit inefficient, but making the block order have the property we want is a lot more annoying and seems more error-prone.
Assignee: general → adrake
Status: NEW → ASSIGNED
Attachment #551987 - Flags: review?(dvander)
Comment on attachment 551987 [details] [diff] [review]
Patch v0

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

::: js/src/ion/LinearScan.cpp
@@ +370,5 @@
>   */
>  bool
>  LinearScanAllocator::buildLivenessInfo()
>  {
> +    Vector<MBasicBlock *, 1, IonAllocPolicy> loopWorkList;

This looks stacky, so could it use SystemAllocPolicy?
Attachment #551987 - Flags: review?(dvander) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/731c20b56be6
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.