isLoopBackedge doesn't work after critical edge unsplitting

RESOLVED FIXED in mozilla24

Status

()

enhancement
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sunfish, Unassigned)

Tracking

Trunk
mozilla24
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

After the fix for bug 881412, debugging/printing routines which call isLoopBackedge don't work, because its assertions assume that critical edges are split.
Attachment #765173 - Flags: review?(bhackett1024)
Comment on attachment 765173 [details] [diff] [review]
a proposed fix

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

::: js/src/ion/MIRGraph.h
@@ +312,5 @@
>          return kind_ == LOOP_HEADER;
>      }
> +    bool hasUniqueBackedge() const {
> +        JS_ASSERT(isLoopHeader());
> +        return numPredecessors() == 2;

Could this assert numPredecessors() >= 2?  I think the numPredecessors() == 1 bit in the assertion you removed is antiquated, and now that we prune dead code from the graph it should (at least after that pass) be the case there are at least two predecessors.
Attachment #765173 - Flags: review?(bhackett1024) → review+
I added numPredecessors() >= 2 as you suggested.

https://hg.mozilla.org/integration/mozilla-inbound/rev/f7c30b1d5c35
https://hg.mozilla.org/mozilla-central/rev/f7c30b1d5c35
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.