Closed
Bug 730786
Opened 13 years ago
Closed 13 years ago
IonMonkey: specialize more phis
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.17 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
In some cases, type analysis was unable to specialize phis so we could end up with some unnecessary LValueToInt32 instructions. This patch is a small win on some benchmarks like gaussian-blur and access-nsieve.
Attachment #600869 -
Flags: review?(dvander)
Comment on attachment 600869 [details] [diff] [review]
Patch
Review of attachment 600869 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/IonAnalysis.cpp
@@ +249,5 @@
> continue;
> MPhi *use = iter.def()->toPhi();
> if (!use->triedToSpecialize())
> continue;
> + if (use->type() == MIRType_None) {
When do MPhis have MIRType_None?
Out of curiosity, is the problem that a phi has an int32 on one edge and a double on another?
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to David Anderson [:dvander] from comment #1)
>
> When do MPhis have MIRType_None?
The algorithm in specializePhis starts like this:
for phi in phis:
phi.specialize(GuessPhiType(phi))
...
GuessPhiType returns MIRType_None if all operands are phis for which triedToSpecialize() returns false. So if the loop visits a phi before visiting its operands (other phis), the phi will have MIRType_None. The patch propagates the operand type when we visit one of the operands (instead of comparing it with MIRType_None and always forcing a Value).
(In reply to David Anderson [:dvander] from comment #2)
> Out of curiosity, is the problem that a phi has an int32 on one edge and a
> double on another?
No but I think that's also worth investigating. I'm pretty sure we will box the value atm but we should be able to specialize such phis as MIRType_Double.
Updated•13 years ago
|
Attachment #600869 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 4•13 years ago
|
||
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.
Description
•