First round of comments, adding Jakob for a 2nd opinion on the 1st DCE
phase/flag.


https://codereview.chromium.org/14676011/diff/1/src/hydrogen-instructions.cc
File src/hydrogen-instructions.cc (right):

https://codereview.chromium.org/14676011/diff/1/src/hydrogen-instructions.cc#newcode1900
src/hydrogen-instructions.cc:1900: stream->Add("%s%s]",
Do we never print phis marked as dead by DCE? If this is the case,
removing this piece information is OK here (at least if you adapt the
format pattern ;-). If not, print it.

https://codereview.chromium.org/14676011/diff/1/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

https://codereview.chromium.org/14676011/diff/1/src/hydrogen-instructions.h#newcode814
src/hydrogen-instructions.h:814: kIsNotDead,
I don't like negated things, especially when the uses are negated, too.
Something like kAlive or kReachable (choose some positive formulation)
is better.

http://www.refactoring.com/catalog/removeDoubleNegative.html

https://codereview.chromium.org/14676011/diff/1/src/hydrogen-instructions.h#newcode1083
src/hydrogen-instructions.h:1083: return HasObservableSideEffects() ||
!IsDeletable();
Hmmm, do we really need IsDead *and* IsNotDeletable? !IsNotDeletable is
a part of IsDead, BTW. Again, negated things are not nice, see above.

https://codereview.chromium.org/14676011/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

https://codereview.chromium.org/14676011/diff/1/src/hydrogen.cc#newcode4858
src/hydrogen.cc:4858: if (FLAG_dead_code_elimination)
DeadCodeElimination();
I am not sure if this is what we want: Almost all our bots run without
DCE, because our tests consist of a lot of dead code. If we don't do
this phase here, we fundamentally change things. Perhaps keep the old
flag for this DCE phase? I'm a bit torn, adding Jakob for a 2nd
opinion...

https://codereview.chromium.org/14676011/diff/1/src/hydrogen.cc#newcode5390
src/hydrogen.cc:5390: ALLOW_HANDLE_DEREF(isolate(), "trace mode for
deadcode");
Why exactly do we need this and why is this safe?

https://codereview.chromium.org/14676011/

--
--
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/groups/opt_out.


Reply via email to