Closed Bug 871002 Opened 12 years ago Closed 12 years ago

IonMonkey: Use uint32 compares where possible

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: bhackett1024, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
MCompare already supports uint32 comparisons, though they are just used by asm.js. The attached patch allows this comparison to be used during normal Ion compilation as well, by looking for and removing uint32 coercions (x >>> 0) on the compare's operands. This eliminates many bailouts that are currently taken on the asm.js bullet demo. Just pattern matching the comparison's inputs should be good enough for asm.js applications, as int32 vs. uint32 operations are distinguished with these coercions on the operands (rather than at the variable level). There are other places where uint32 coercions appear --- div, mod, fp div (?) --- but the fix there is more involved and can be done separately.
Attachment #748206 - Flags: review?(jdemooij)
Comment on attachment 748206 [details] [diff] [review] patch Review of attachment 748206 [details] [diff] [review]: ----------------------------------------------------------------- It would be nice to add MIRType_Uint32 and handle uint32 values better (bug 750947), but in the meantime this seems fine.
Attachment #748206 - Flags: review?(jdemooij) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Depends on: 889186
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: