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

Issue 631483002: Subzero: Optimize a common live range overlap calculation. (Closed)

Created:
6 years, 2 months ago by Jim Stichnoth
Modified:
6 years, 2 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Optimize a common live range overlap calculation. Call instruction lowering includes the FakeKill instruction, which creates several precolored variables, one for each scratch register. The live range for each of these variables consists of a set of "point" ranges, one point for every FakeKill instruction. The overlaps() logic is such that a point range never overlaps with an individual instruction, but it can overlap with a normal non-point range. It turns out that during register allocation, usually most of the variables on the Inactive list are these FakeKill instructions. The live range representation can be quite large if there are many calls in the function. In the "Check for inactive ranges that have expired or reactivated" section, a lot of time was spent on overlapsStart() calls that were doomed to return false. This change lets the live range keep track of whether it contains non-point segments, and if not, optimize the overlaps(InstNumberT) method. BUG= none R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=df861f73ce9f3dff4502be794cfdc23a013427e3

Patch Set 1 #

Total comments: 2

Patch Set 2 : Clear IsNonpoints during reset() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -1 line) Patch
M src/IceOperand.h View 1 2 chunks +7 lines, -1 line 0 comments Download
M src/IceOperand.cpp View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Jim Stichnoth
Several of the spec2k components improve translation time by ~20%.
6 years, 2 months ago (2014-10-04 04:10:06 UTC) #2
jvoung (off chromium)
Cool! Otherwise LGTM https://codereview.chromium.org/631483002/diff/1/src/IceOperand.h File src/IceOperand.h (right): https://codereview.chromium.org/631483002/diff/1/src/IceOperand.h#newcode305 src/IceOperand.h:305: Weight.setWeight(0); Seems like reset() should reset ...
6 years, 2 months ago (2014-10-04 05:06:34 UTC) #3
Jim Stichnoth
Committed patchset #2 (id:20001) manually as df861f73ce9f3dff4502be794cfdc23a013427e3 (presubmit successful).
6 years, 2 months ago (2014-10-04 12:43:51 UTC) #4
Jim Stichnoth
6 years, 2 months ago (2014-10-04 12:44:09 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/631483002/diff/1/src/IceOperand.h
File src/IceOperand.h (right):

https://codereview.chromium.org/631483002/diff/1/src/IceOperand.h#newcode305
src/IceOperand.h:305: Weight.setWeight(0);
On 2014/10/04 05:06:34, jvoung wrote:
> Seems like reset() should reset IsNonpoints ?

Done.

Powered by Google App Engine
This is Rietveld 408576698