Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2509623002: [turbofan] Sparse representation for state values (Closed)
Patch Set: Remove the optimized_out input entirely, return nullptr when iterating Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 }; 478 };
479 479
480 480
481 // Returns the number of instruction operands added to inputs. 481 // Returns the number of instruction operands added to inputs.
482 size_t AddOperandToStateValueDescriptor(StateValueDescriptor* descriptor, 482 size_t AddOperandToStateValueDescriptor(StateValueDescriptor* descriptor,
483 InstructionOperandVector* inputs, 483 InstructionOperandVector* inputs,
484 OperandGenerator* g, 484 OperandGenerator* g,
485 StateObjectDeduplicator* deduplicator, 485 StateObjectDeduplicator* deduplicator,
486 Node* input, MachineType type, 486 Node* input, MachineType type,
487 FrameStateInputKind kind, Zone* zone) { 487 FrameStateInputKind kind, Zone* zone) {
488 if (input == nullptr) {
489 inputs->push_back(g->TempImmediate(FrameStateDescriptor::kImpossibleValue));
Jarin 2016/11/16 15:32:42 This should be the optimized_out value, no?
Leszek Swirski 2016/11/17 09:23:04 Yeah, I had a problem here that the jsgraph isn't
490 descriptor->fields().push_back(
491 StateValueDescriptor::Plain(zone, MachineType::None()));
Jarin 2016/11/16 15:32:42 MachineType::AnyTagged()
Leszek Swirski 2016/11/17 09:23:04 As above.
492 return 1;
493 }
494
488 switch (input->opcode()) { 495 switch (input->opcode()) {
489 case IrOpcode::kObjectState: { 496 case IrOpcode::kObjectState: {
490 UNREACHABLE(); 497 UNREACHABLE();
491 return 0; 498 return 0;
492 } 499 }
493 case IrOpcode::kTypedObjectState: { 500 case IrOpcode::kTypedObjectState: {
494 size_t id = deduplicator->GetObjectId(input); 501 size_t id = deduplicator->GetObjectId(input);
495 if (id == StateObjectDeduplicator::kNotDuplicated) { 502 if (id == StateObjectDeduplicator::kNotDuplicated) {
496 size_t entries = 0; 503 size_t entries = 0;
497 id = deduplicator->InsertObject(input); 504 id = deduplicator->InsertObject(input);
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 return new (instruction_zone()) FrameStateDescriptor( 2117 return new (instruction_zone()) FrameStateDescriptor(
2111 instruction_zone(), state_info.type(), state_info.bailout_id(), 2118 instruction_zone(), state_info.type(), state_info.bailout_id(),
2112 state_info.state_combine(), parameters, locals, stack, 2119 state_info.state_combine(), parameters, locals, stack,
2113 state_info.shared_info(), outer_state); 2120 state_info.shared_info(), outer_state);
2114 } 2121 }
2115 2122
2116 2123
2117 } // namespace compiler 2124 } // namespace compiler
2118 } // namespace internal 2125 } // namespace internal
2119 } // namespace v8 2126 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698