Reviewers: jarin,
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc
File src/compiler/register-allocator.cc (right):
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1302
src/compiler/register-allocator.cc:1302: LiveRangeBound* Find(const
LifetimePosition position) {
On 2014/11/04 10:42:08, jarin wrote:
Could not we use std::lower_bound for this?
benchmarking says no
i refactored the current code and it drops from 3.5% of the compilation
time of zlib to 3
with lower_bound it's around 4
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1310
src/compiler/register-allocator.cc:1310: DCHECK(right_index !=
current_index);
On 2014/11/04 10:42:08, jarin wrote:
How about DCHECK(right_index > current_index)?
Done.
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1316
src/compiler/register-allocator.cc:1316: left_index = right_index;
On 2014/11/04 10:42:09, jarin wrote:
I think this degenerate case would not appear if you calculated
current_index = left_index + (right_index + 1 - left_index) / 2;
(or if your right_index was exclusive).
Done.
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1361
src/compiler/register-allocator.cc:1361: bool SetCurrent(int
operand_index) {
On 2014/11/04 10:42:09, jarin wrote:
Maybe this could return the LiveRangeBound pointer so that there is
not this
funny 'current_' state in this class (then it is basically just a
cache for the
bound arrays).
Done.
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.cc#newcode1363
src/compiler/register-allocator.cc:1363: // TODO(dcarney): can this
happen at this point?
On 2014/11/04 10:42:09, jarin wrote:
Yeah, just DCHECK here that the things that should not happen do not
happen.
Done.
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.h
File src/compiler/register-allocator.h (right):
https://codereview.chromium.org/694473002/diff/200001/src/compiler/register-allocator.h#newcode354
src/compiler/register-allocator.h:354: Zone* zone() const { return
zone_; }
On 2014/11/04 10:42:09, jarin wrote:
Since you already touching this, could you possibly rename to
local_zone()?
Done.
Description:
[turbofan] optimize hot loop in ResolveControlFlow
[email protected]
BUG=
Please review this at https://codereview.chromium.org/694473002/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+216, -106 lines):
M src/compiler/register-allocator.h
M src/compiler/register-allocator.cc
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.