Go to file
svenpanne@chromium.org 66bb4c5b8d Improve code for integral modulus calculation.
Depending on what we know about the right operand, we basically do 3
different things (and the code is actually structured this way):

* If we statically know that the right operand is a power of 2, we do
  some bit fiddling instead of doing a "real" modulus calculation.
  This should actually be done on the Hydrogen level, not on the
  Lithium level, but this will be a separate CL.

* If type feedback tells us that the right operand is a power of 2, we
  do the same as above, but guarded by conditional deoptimization to
  make sure that the assumption is still valid. In the long run, we
  should make this guard visible on the Hydrogen level to make it
  visible for GVN and other optimizations.

* In the general case we only do the minimum steps necessary and don't
  try to be too clever, because cleverness actually slows us down on
  real-world code.

If we look at the code gerators for LModI, we actually see that we
basically have 3 (4 on ARM) fundamentally different translations. I
don't really like lumping them together, they should probably be
different Lithium instructions. For the time being, I restructured the
generators to make this crystal-clear, at the cost of some duplication
regarding the power-of-2 cases. This will go away when we do the
strength reduction on the Hydrogen level, so I'd like to keep it as it
is for now.

Note that the MIPS part was only slightly restructured, there is still
some work to do there.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/15769010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 12:05:54 +00:00
benchmarks More fixes for V8 benchmark version 7. 2012-03-15 17:13:50 +00:00
build ARM: Fix build flags for snapshot generation. 2013-06-07 10:02:42 +00:00
include add a default value for return value 2013-06-10 07:41:16 +00:00
preparser Remove SCons related files 2013-04-18 11:01:14 +00:00
samples Cutover v8 to use new style callbacks internally 2013-06-05 12:36:33 +00:00
src Improve code for integral modulus calculation. 2013-06-10 12:05:54 +00:00
test Fix re-initialization of existing double field. 2013-06-10 11:55:47 +00:00
tools Fixed typo in test expectations SKIP -> Skip 2013-06-07 18:34:24 +00:00
.gitignore Refactor HCheckMaps to have a private constructor, removing duplicated code and simplifying calls in clients. 2013-04-19 16:46:13 +00:00
AUTHORS Add methods to allow resuming execution after calling TerminateExecution(). 2013-04-22 15:01:45 +00:00
ChangeLog Prepare push to trunk. Now working on version 3.19.12. 2013-06-07 15:58:51 +00:00
DEPS Pull more recent gyp. 2012-09-26 09:12:45 +00:00
LICENSE Update LICENSE file 2012-01-03 16:38:42 +00:00
LICENSE.strongtalk Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.v8 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.valgrind Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
Makefile Enable Native Client build of V8. 2013-04-17 08:27:40 +00:00
Makefile.android MIPS: Add android build support for mips in gyp. 2013-02-25 16:39:03 +00:00
Makefile.nacl Allow a relativ path to the NaCl SDK when building. 2013-05-28 15:33:39 +00:00
OWNERS Added Hannes and Dmitry to OWNERS 2013-03-21 12:09:53 +00:00
PRESUBMIT.py Run style checks also when uploading. 2013-04-11 12:41:31 +00:00