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

Unified Diff: src/compiler/instruction-selector.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 | « src/compiler/instruction.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.h
diff --git a/src/compiler/instruction-selector.h b/src/compiler/instruction-selector.h
index 59f8073d61fdad0c479c2b207b2ca7aacb939ca4..4e916befb19b285628e9bd5ec3f909a643175221 100644
--- a/src/compiler/instruction-selector.h
+++ b/src/compiler/instruction-selector.h
@@ -21,12 +21,17 @@ struct CallBuffer; // TODO(bmeurer): Remove this.
class FlagsContinuation;
class Linkage;
+typedef IntVector NodeToVregMap;
+
class InstructionSelector FINAL {
public:
+ static const int kNodeUnmapped = -1;
+
// Forward declarations.
class Features;
- InstructionSelector(Zone* local_zone, Linkage* linkage,
+ // TODO(dcarney): pass in vreg mapping instead of graph.
+ InstructionSelector(Zone* local_zone, Graph* graph, Linkage* linkage,
InstructionSequence* sequence, Schedule* schedule,
SourcePositionTable* source_positions,
Features features = SupportedFeatures());
@@ -110,6 +115,11 @@ class InstructionSelector FINAL {
// Checks if {node} is currently live.
bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); }
+ int GetVirtualRegister(const Node* node);
+ // Gets the current mapping if it exists, kNodeUnmapped otherwise.
+ int GetMappedVirtualRegister(const Node* node) const;
+ const NodeToVregMap& GetNodeMapForTesting() const { return node_map_; }
+
private:
friend class OperandGenerator;
@@ -206,6 +216,7 @@ class InstructionSelector FINAL {
SourcePositionTable* const source_positions_;
Features features_;
Schedule* const schedule_;
+ NodeToVregMap node_map_;
BasicBlock* current_block_;
ZoneDeque<Instruction*> instructions_;
BoolVector defined_;
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698