Closed Bug 855965 Opened 8 years ago Closed 8 years ago

IonMonkey: Range analysis does not use rely on known constant when using OSR.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: nbp, Assigned: nbp)

Details

Attachments

(1 file)

When we OSR into a loop, the range analysis is still able to find the symbolic range but does not take any of its values into account to shorten the loop variable range.  This caused us to keep loop variables running from -inf..+inf instead of 0..+inf when the initial bound is known to be zero by the range analysis.

This patch saves 6ms out of 125ms (~5%) of kraken gaussian-blur.
Attachment #731036 - Flags: review?(mrosenberg)
Comment on attachment 731036 [details] [diff] [review]
Use constant found by the range analysis to reset the lower/upper bound of the Phi.

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

::: js/src/ion/RangeAnalysis.cpp
@@ +1042,1 @@
>      if (modified.constant > 0) {

I assume this implies that it is either monotonically increasing or decreasing?
Attachment #731036 - Flags: review?(mrosenberg) → review+
(In reply to Marty Rosenberg [:mjrosenb] from comment #1)
> Comment on attachment 731036 [details] [diff] [review]
> Use constant found by the range analysis to reset the lower/upper bound of
> the Phi.
> 
> Review of attachment 731036 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: js/src/ion/RangeAnalysis.cpp
> @@ +1042,1 @@
> >      if (modified.constant > 0) {
> 
> I assume this implies that it is either monotonically increasing or
> decreasing?

Yes, in other cases we cannot either set a minimum or a maximum.
https://hg.mozilla.org/integration/mozilla-inbound/rev/ae83ff003e82
Assignee: general → nicolas.b.pierron
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/ae83ff003e82
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.