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

Issue 169223004: A64: Replace memcpy with reinterpret_cast assignment in simulator and decoder. (Closed)

Created:
6 years, 10 months ago by ulan
Modified:
6 years, 9 months ago
CC:
v8-dev
Visibility:
Public.

Description

A64: Replace memcpy with reinterpret_cast assignment in simulator and decoder. BUG=

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -12 lines) Patch
M src/a64/instructions-a64.h View 2 chunks +6 lines, -8 lines 1 comment Download
M src/a64/simulator-a64.h View 1 chunk +1 line, -1 line 0 comments Download
M src/a64/simulator-a64.cc View 3 chunks +23 lines, -3 lines 3 comments Download

Messages

Total messages: 8 (0 generated)
ulan
PTAL. Is this safe to replace memcpy? This speeds up the simulator by ~20%: Richards: ...
6 years, 10 months ago (2014-02-18 17:35:18 UTC) #1
Rodolph Perfetta (ARM)
It is not safe, and I am surprised at the speedup, the compiler should be ...
6 years, 10 months ago (2014-02-18 18:26:05 UTC) #2
jochen (gone - plz use gerrit)
On 2014/02/18 18:26:05, Rodolph Perfetta (ARM) wrote: > It is not safe, and I am ...
6 years, 10 months ago (2014-02-18 21:14:25 UTC) #3
jbramley
On 2014/02/18 21:14:25, jochen wrote: > On 2014/02/18 18:26:05, Rodolph Perfetta (ARM) wrote: > > ...
6 years, 10 months ago (2014-02-19 10:03:16 UTC) #4
jbramley
It might be worth investigating which memcpy calls are problematic, if you haven't already. I ...
6 years, 10 months ago (2014-02-19 10:12:22 UTC) #5
Rodolph Perfetta
> > I doubt that the compiler can optimize the memcpy calls away. We profiled ...
6 years, 10 months ago (2014-02-19 10:12:23 UTC) #6
ulan
Thanks for the comments, Rodolph and Jacob! I tried fixed width MemoryRead/Write in this CL: ...
6 years, 10 months ago (2014-02-19 10:52:40 UTC) #7
jochen (gone - plz use gerrit)
6 years, 10 months ago (2014-02-19 13:21:53 UTC) #8
On 2014/02/19 10:52:40, ulan wrote:
> Thanks for the comments, Rodolph and Jacob!
> 
> I tried fixed width MemoryRead/Write in this CL:
> https://codereview.chromium.org/172223002
> 
> It improves Richards score to 55.5. The hottest function in perf profile is
> Instruction::Bits, memcpy is in top 3.

I looked at the assembly output, and the memcpy is actually optimized away.

I wanted to point out Instruction::SignedBits already uses the
reinterpret_cast<> magic, so adding it to Bits() at least doesn't make it
worse[tm].

I also tried to force inline Instruction::Bits which makes it disappear from the
perf output, so I guess that's a bit of a red herring anyway. The real problem
is that decoding the instructions takes too long :-/

Powered by Google App Engine
This is Rietveld 408576698