Getting closer....
Can you please verify (e.g. test cases) that this works also for special
HValues
that don't generate code explicitly, e.g. if they key is passed in as a
HParameter or is the return value of a function call?
https://codereview.chromium.org/179773002/diff/70001/src/x64/lithium-x64.cc
File src/x64/lithium-x64.cc (right):
https://codereview.chromium.org/179773002/diff/70001/src/x64/lithium-x64.cc#newcode1979
src/x64/lithium-x64.cc:1979: void RecordKeyValueThroughPhi(HValue* phi,
BitVector* key_values) {
This should be called FindDehoistedKeyDefinitions, make it a private
member of the ChunkBuilder so that you don't have to pass in the
BitVector.
void LChunkBuilder::FindDehoistedKeyDefinitions(HValue* camdidate) {
if (dehoisted_key_ids_->Contains(camdidate->id())) return;
dehoisted_key_ids_->Add(value->id());
if (!candidate->IsPhi()) return;
for (int i = 0; i < candidate->OperandCount(); ++i) {
FindDehoistedKeyDefinitions(candidate->OperandAt(i));
}
}
https://codereview.chromium.org/179773002/diff/70001/src/x64/lithium-x64.cc#newcode2000
src/x64/lithium-x64.cc:2000: if
(!key_values->Contains(instr->key()->id())) {
Move most of the logic here into RecordKeyValueThroughPhi. The code here
should be very simple:
if (instr->IsDehoisted()) {
FindDehoistedKeyDefinitions(instr->key());
}
https://codereview.chromium.org/179773002/diff/70001/src/x64/lithium-x64.cc#newcode2046
src/x64/lithium-x64.cc:2046: BitVector* key_values =
chunk()->GetKeyValues();
See comment above.
https://codereview.chromium.org/179773002/diff/70001/src/x64/lithium-x64.h
File src/x64/lithium-x64.h (right):
https://codereview.chromium.org/179773002/diff/70001/src/x64/lithium-x64.h#newcode2521
src/x64/lithium-x64.h:2521: BitVector key_values_;
This variable, the accesses for it and naming based on it should be
something more like "dehoisted_key_ids_"
https://codereview.chromium.org/179773002/
--
--
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.