LGTM with comments.
https://codereview.chromium.org/664683002/diff/170001/src/compiler/instruction-selector.cc
File src/compiler/instruction-selector.cc (left):
https://codereview.chromium.org/664683002/diff/170001/src/compiler/instruction-selector.cc#oldcode855
src/compiler/instruction-selector.cc:855: // TODO(bmeurer): Emit a
PhiInstruction here.
Remove this TODO.
https://codereview.chromium.org/664683002/diff/170001/src/compiler/instruction-selector.cc
File src/compiler/instruction-selector.cc (right):
https://codereview.chromium.org/664683002/diff/170001/src/compiler/instruction-selector.cc#newcode861
src/compiler/instruction-selector.cc:861: for (Node::Inputs::iterator
iter(inputs.begin()); iter != inputs.end();
How about this instead?
const int input_count = node->op()->InputCount();
phi->operands().reserve(static_cast<size_t>(input_count));
for (int i = 0; i < node->op()->InputCount(); ++i) {
Node* const input = node->InputAt(i);
MarkAsUsed(input);
phi->operands().push_back(sequence()->GetVirtualRegister(input));
}
https://codereview.chromium.org/664683002/diff/170001/src/compiler/register-allocator.cc
File src/compiler/register-allocator.cc (right):
https://codereview.chromium.org/664683002/diff/170001/src/compiler/register-allocator.cc#newcode533
src/compiler/register-allocator.cc:533: for
(InstructionBlock::Successors::const_iterator i =
s/InstructionBlock::Successors::const_iterator/auto/
https://codereview.chromium.org/664683002/diff/170001/src/compiler/register-allocator.cc#newcode546
src/compiler/register-allocator.cc:546: for
(InstructionBlock::PhiInstructions::const_iterator j =
s/InstructionBlock::PhiInstructions::const_iterator/auto/
https://codereview.chromium.org/664683002/diff/170001/src/compiler/register-allocator.cc#newcode771
src/compiler/register-allocator.cc:771: for
(InstructionBlock::Successors::const_iterator succ =
s/InstructionBlock::Successors::const_iterator/auto/
https://codereview.chromium.org/664683002/diff/170001/src/compiler/register-allocator.cc#newcode790
src/compiler/register-allocator.cc:790: for
(InstructionBlock::Successors::const_iterator succ =
s/InstructionBlock::Successors::const_iterator/auto/
https://codereview.chromium.org/664683002/diff/170001/src/compiler/register-allocator.cc#newcode1064
src/compiler/register-allocator.cc:1064: for
(InstructionBlock::PhiInstructions::const_iterator i =
s/InstructionBlock::PhiInstructions::const_iterator/auto/
https://codereview.chromium.org/664683002/
--
--
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.