Thinking about the CanBeBetterLeftOperand thing again...maybe instead of
making
IsUsed() and IsDefined() public, we can have a public method
// Checks if {node} is currently live.
bool IsLive(Node* node) const { return !selector()->IsDefined(node) &&
selector()->IsUsed(node); }
in the InstructionSelector class, which can be used to implement your
CanBeBetterLeftOperand.
https://codereview.chromium.org/591343002/diff/1/src/compiler/ia32/instruction-selector-ia32.cc
File src/compiler/ia32/instruction-selector-ia32.cc (right):
https://codereview.chromium.org/591343002/diff/1/src/compiler/ia32/instruction-selector-ia32.cc#newcode41
src/compiler/ia32/instruction-selector-ia32.cc:41: bool
CanBeBetterLeftOperand(Node* node) { return !selector()->IsUsed(node); }
Nit: method should be const.
https://codereview.chromium.org/591343002/
--
--
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.