Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Issue 10442003: MIPS: Array index computation dehoisting. (Closed)

Created:
8 years, 7 months ago by palfia
Modified:
8 years, 7 months ago
Reviewers:
kisg, Paul Lind, Massi, danno
CC:
v8-dev
Visibility:
Public.

Description

MIPS: Array index computation dehoisting. Port r11596 (0cee9fca) Original commit message: Array index computation dehoisting. When an array index (in an array access) is a simple "expression + constant", just embed the constant in the array access operation so that the full index expression is (potentially) no longer used and its live range can be much shorter. This is effective in conjunction with array bounds check removal (otherwise the index is anyway used in the check). BUG= TEST= Committed: https://code.google.com/p/v8/source/detail?r=11644

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -20 lines) Patch
M src/mips/lithium-codegen-mips.cc View 8 chunks +45 lines, -18 lines 3 comments Download
M src/mips/lithium-mips.h View 6 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
palfia
8 years, 7 months ago (2012-05-23 23:40:48 UTC) #1
Massi
LGTM, I'll fix the two nits and commit it. Massi https://chromiumcodereview.appspot.com/10442003/diff/1/src/mips/lithium-codegen-mips.cc File src/mips/lithium-codegen-mips.cc (right): https://chromiumcodereview.appspot.com/10442003/diff/1/src/mips/lithium-codegen-mips.cc#newcode2603 ...
8 years, 7 months ago (2012-05-24 09:01:31 UTC) #2
palfia
8 years, 7 months ago (2012-05-24 16:16:32 UTC) #3
Thanks for fixing these.

https://chromiumcodereview.appspot.com/10442003/diff/1/src/mips/lithium-codeg...
File src/mips/lithium-codegen-mips.cc (right):

https://chromiumcodereview.appspot.com/10442003/diff/1/src/mips/lithium-codeg...
src/mips/lithium-codegen-mips.cc:3644: __ Addu(scratch0(), key,
instr->additional_index());
On 2012/05/24 09:01:31, Massi wrote:
> You moved the declaration "Register scratch = scratch0();" just before this
> block but you still use "scratch0()" in the Addu: wouldn't it be cleaner using
> "scratch"?
Yes, it is much cleaner.

Powered by Google App Engine
This is Rietveld 408576698