IonMonkey: Stack allocation bugs in GRA

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dvander, Assigned: dvander)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Two more bugs in GRA stack allocation:
 (1) uses in snapshots are not held live across loops
 (2) we can accidentally free half of a nunbox as a normal stack slot (they must be freed as a whole)
Created attachment 587218 [details] [diff] [review]
fixes
Attachment #587218 - Flags: review?(sstangl)
Comment on attachment 587218 [details] [diff] [review]
fixes

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

::: js/src/ion/GreedyAllocator.cpp
@@ +793,5 @@
> +            if (!a->isUse())
> +                continue;
> +            VirtualRegister *vr = getVirtualRegister(a->toUse());
> +            if (vr->def->virtualRegister() < lowerBound || vr->def->virtualRegister() > upperBound)
> +                allocateStack(vr);

Duplicates code above, which isn't fashionable.
void findLoopCarriedUses(LAllocation *, uint32, uint32)?
Attachment #587218 - Flags: review?(sstangl) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/0a8aee9639cf w/ nits
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.