Last Comment Bug 771383 - IonMonkey: constant fold length/elements accesses on singleton typed arrays
: IonMonkey: constant fold length/elements accesses on singleton typed arrays
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on:
Blocks: 771106
  Show dependency treegraph
 
Reported: 2012-07-05 16:50 PDT by Brian Hackett (:bhackett)
Modified: 2012-07-07 11:29 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (171cc91d4c18) (13.21 KB, patch)
2012-07-05 16:50 PDT, Brian Hackett (:bhackett)
dvander: review+
Details | Diff | Splinter Review

Description Brian Hackett (:bhackett) 2012-07-05 16:50:53 PDT
Created attachment 639517 [details] [diff] [review]
patch (171cc91d4c18)

Once created, typed array lengths and elements pointers are immutable.  Now that typed arrays can be singletons, these values can be baked in for accesses on these arrays.  This reduces register pressure / instruction counts for length accesses, makes a tiny difference for elements too (elements currently need to be in a register).  This also simplifies things for further optimizations towards bug 771106.
Comment 1 David Anderson [:dvander] 2012-07-05 20:11:31 PDT
Comment on attachment 639517 [details] [diff] [review]
patch (171cc91d4c18)

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

::: js/src/ion/shared/Lowering-shared.cpp
@@ +72,5 @@
>      return true;
>  }
>  
>  bool
> +LIRGeneratorShared::visitConstantElements(MConstantElements *ins)

This should go in Lowering.cpp nowadays (the file name is confusing but shared is for utility functions).
Comment 2 Brian Hackett (:bhackett) 2012-07-07 11:29:49 PDT
https://hg.mozilla.org/projects/ionmonkey/rev/c565755644e0

Note You need to log in before you can comment on or make changes to this bug.