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

Issue 230473005: ARM: Do not set FPSCR when converting to clamped uint8 (Closed)

Created:
6 years, 8 months ago by oetuaho-nv
Modified:
6 years, 8 months ago
Reviewers:
ulan, Jarin, jbramley, rmcilroy
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

ARM: Do not set FPSCR when converting to clamped uint8 Setting the FPSCR flags is expensive on some CPUs. Get rid of repeated setting of the FPSCR by relying on the correct default flags being set when doing uint8 clamping. Also use vcvt_u32_f64 instead of vcvt_s32_f64, which enables removing the check against zero (vcvt_u32_f64 will clamp to zero). To be on the safe side, add asserts to check that the VFP rounding mode flags are set to default as expected. This increases performance of a hot loop repeatedly setting Uint8ClampedArray values on some CPUs by as much as a factor of 12. BUG=v8:3253 LOG=N R=jacob.bramley@arm.com, rmcilroy@chromium.org, ulan@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=20676 Committed: https://code.google.com/p/v8/source/detail?r=20755

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address nits #

Patch Set 3 : Fix initial FPSCR state in ARM simulator #

Patch Set 4 : Use stop instead of assert to avoid infinite recursion #

Patch Set 5 : Rebase on top of separate simulator fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -25 lines) Patch
M src/arm/macro-assembler-arm.cc View 1 2 3 2 chunks +16 lines, -25 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
oetuaho-nv
This CL implements the alternative, simpler approach from discussions at: https://codereview.chromium.org/222403002/ Did not find any ...
6 years, 8 months ago (2014-04-09 14:14:08 UTC) #1
jbramley
For the record: lgtm (I'm not an owner though, so that doesn't actually help you.) ...
6 years, 8 months ago (2014-04-09 14:18:25 UTC) #2
oetuaho-nv
https://codereview.chromium.org/230473005/diff/1/src/arm/macro-assembler-arm.cc File src/arm/macro-assembler-arm.cc (right): https://codereview.chromium.org/230473005/diff/1/src/arm/macro-assembler-arm.cc#newcode3815 src/arm/macro-assembler-arm.cc:3815: if (emit_debug_code()) { On 2014/04/09 14:18:26, jbramley wrote: > ...
6 years, 8 months ago (2014-04-09 14:24:30 UTC) #3
rmcilroy
Looks good other than my nits - thanks. https://codereview.chromium.org/230473005/diff/1/src/arm/macro-assembler-arm.cc File src/arm/macro-assembler-arm.cc (right): https://codereview.chromium.org/230473005/diff/1/src/arm/macro-assembler-arm.cc#newcode3815 src/arm/macro-assembler-arm.cc:3815: if ...
6 years, 8 months ago (2014-04-09 15:53:30 UTC) #4
oetuaho-nv
Uploaded a new version with the nits addressed.
6 years, 8 months ago (2014-04-10 09:21:52 UTC) #5
rmcilroy
On 2014/04/10 09:21:52, oetuaho-nv wrote: > Uploaded a new version with the nits addressed. lgtm. ...
6 years, 8 months ago (2014-04-10 16:01:14 UTC) #6
ulan
lgtm
6 years, 8 months ago (2014-04-11 08:36:11 UTC) #7
rmcilroy
Committed patchset #2 manually as r20676 (presubmit successful).
6 years, 8 months ago (2014-04-11 09:22:29 UTC) #8
ulan
On 2014/04/11 09:22:29, rmcilroy wrote: > Committed patchset #2 manually as r20676 (presubmit successful). Looks ...
6 years, 8 months ago (2014-04-11 09:54:41 UTC) #9
rmcilroy
On 2014/04/11 09:54:41, ulan wrote: > On 2014/04/11 09:22:29, rmcilroy wrote: > > Committed patchset ...
6 years, 8 months ago (2014-04-11 10:15:02 UTC) #10
oetuaho-nv
On 2014/04/11 10:15:02, rmcilroy wrote: > I reverted the CL in https://codereview.chromium.org/233013005/. You can run ...
6 years, 8 months ago (2014-04-11 10:39:09 UTC) #11
jbramley
On 2014/04/11 10:39:09, oetuaho-nv wrote: > On 2014/04/11 10:15:02, rmcilroy wrote: > > I reverted ...
6 years, 8 months ago (2014-04-11 10:43:38 UTC) #12
jbramley
On 2014/04/11 10:43:38, jbramley wrote: > On 2014/04/11 10:39:09, oetuaho-nv wrote: > > On 2014/04/11 ...
6 years, 8 months ago (2014-04-11 10:44:06 UTC) #13
oetuaho-nv
On 2014/04/11 10:44:06, jbramley wrote: > On 2014/04/11 10:43:38, jbramley wrote: > > On 2014/04/11 ...
6 years, 8 months ago (2014-04-11 13:00:42 UTC) #14
oetuaho-nv
> Patch set 3 has the correct initial FPSCR state in the ARM simulator, but ...
6 years, 8 months ago (2014-04-11 13:31:24 UTC) #15
jbramley
On 2014/04/11 13:31:24, oetuaho-nv wrote: > > Patch set 3 has the correct initial FPSCR ...
6 years, 8 months ago (2014-04-11 14:23:17 UTC) #16
oetuaho-nv
Figured out the bug, it was actually hitting infinite recursion in code generation, since Assert ...
6 years, 8 months ago (2014-04-14 10:29:50 UTC) #17
rmcilroy
On 2014/04/14 10:29:50, oetuaho-nv wrote: > Figured out the bug, it was actually hitting infinite ...
6 years, 8 months ago (2014-04-14 11:39:52 UTC) #18
oetuaho-nv
The simulator fix has been there for a day now, time to commit this?
6 years, 8 months ago (2014-04-15 07:51:16 UTC) #19
rmcilroy
On 2014/04/15 07:51:16, oetuaho-nv wrote: > The simulator fix has been there for a day ...
6 years, 8 months ago (2014-04-15 08:28:02 UTC) #20
rmcilroy
6 years, 8 months ago (2014-04-15 09:58:14 UTC) #21
Message was sent while issue was closed.
Committed patchset #5 manually as r20755 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698