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

Unified Diff: src/compiler/instruction.h

Issue 683933004: [turbofan] move Node to vreg mapping to InstructionSelector (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 72453edb63bb0aa00b887244dbcb42f2c6dcd10d..6d37b9f6932eec59d0c78e8db3db8687c137f0cb 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -842,22 +842,17 @@ typedef ZoneDeque<Instruction*> InstructionDeque;
typedef ZoneDeque<PointerMap*> PointerMapDeque;
typedef ZoneVector<FrameStateDescriptor*> DeoptimizationVector;
typedef ZoneVector<InstructionBlock*> InstructionBlocks;
-typedef IntVector NodeToVregMap;
// Represents architecture-specific generated code before, during, and after
// register allocation.
// TODO(titzer): s/IsDouble/IsFloat64/
class InstructionSequence FINAL {
public:
- static const int kNodeUnmapped = -1;
-
- InstructionSequence(Zone* zone, const Graph* graph, const Schedule* schedule);
+ InstructionSequence(Zone* zone, const Schedule* schedule);
int NextVirtualRegister() { return next_virtual_register_++; }
int VirtualRegisterCount() const { return next_virtual_register_; }
- int node_count() const { return static_cast<int>(node_map_.size()); }
-
const InstructionBlocks& instruction_blocks() const {
return instruction_blocks_;
}
@@ -882,9 +877,6 @@ class InstructionSequence FINAL {
const InstructionBlock* GetInstructionBlock(int instruction_index) const;
- int GetVirtualRegister(const Node* node);
- const NodeToVregMap& GetNodeMapForTesting() const { return node_map_; }
-
bool IsReference(int virtual_register) const;
bool IsDouble(int virtual_register) const;
@@ -919,8 +911,8 @@ class InstructionSequence FINAL {
void StartBlock(BasicBlock* block);
void EndBlock(BasicBlock* block);
- int AddConstant(Node* node, Constant constant) {
- int virtual_register = GetVirtualRegister(node);
+ int AddConstant(int virtual_register, Constant constant) {
+ DCHECK(virtual_register >= 0 && virtual_register < next_virtual_register_);
DCHECK(constants_.find(virtual_register) == constants_.end());
constants_.insert(std::make_pair(virtual_register, constant));
return virtual_register;
@@ -967,7 +959,6 @@ class InstructionSequence FINAL {
typedef std::set<int, std::less<int>, ZoneIntAllocator> VirtualRegisterSet;
Zone* const zone_;
- NodeToVregMap node_map_;
InstructionBlocks instruction_blocks_;
ConstantMap constants_;
ConstantDeque immediates_;
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698