[Webkit-unassigned] [Bug 142966] Optimize typed array access with a masked index

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 23 04:18:50 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=142966

--- Comment #1 from dougc <dtc-llvm at scieneer.com> ---
Created attachment 249234
  --> https://bugs.webkit.org/attachment.cgi?id=249234&action=review
Optimize away bounds checks when given masked typed array indexes.

This is a proof-of-concept patch that implements this optimization for the Speculative-JIT and FTL.

The function indexInBounds has been added that matches the index masking patterns and determines if the index is within bounds. This has currently just been placed at the start of DFGConstantFoldingPhase.cpp, and I could use help on the appropriate file for such functions?

I noticed that the constant folding of CheckInBounds was not running consistently because the cfaFoundConstants block flag was not being set. The patch attempts to fix this by reworking the CheckInBounds handling in DFGAbstractInterpreterInlines.h.

Optimization of (i & -1) to identity has been added in strength reduction, and it appears that BitXor would be more appropriately grouped with BitXor. For Emscripten generated code it might be important to be able to efficiently optimize away the masking when the masks are set to -1.

Feedback and help with this first patch welcomed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150323/427b18e2/attachment-0002.html>


More information about the webkit-unassigned mailing list