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

Unified Diff: src/compiler/instruction-selector.h

Issue 669133004: [turbofan] Improve code generation for inline comparisons with zero. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE 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/ia32/instruction-selector-ia32.cc ('k') | src/compiler/machine-operator-reducer.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 c4cf18bc770a9769bb32b9cb347ddc73fcb48829..cc06f10c5d9aa17b54f2abadc54f15752a10270d 100644
--- a/src/compiler/instruction-selector.h
+++ b/src/compiler/instruction-selector.h
@@ -85,20 +85,10 @@ class InstructionSelector FINAL {
return Features(CpuFeatures::SupportedFeatures());
}
- // Checks if {node} is currently live.
- bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); }
-
- private:
- friend class OperandGenerator;
-
// ===========================================================================
// ============ Architecture-independent graph covering methods. =============
// ===========================================================================
- // Checks if {block} will appear directly after {current_block_} when
- // assembling code, in which case, a fall-through can be used.
- bool IsNextInAssemblyOrder(const BasicBlock* block) const;
-
// Used in pattern matching during code generation.
// Check if {node} can be covered while generating code for the current
// instruction. A node can be covered if the {user} of the node has the only
@@ -109,13 +99,23 @@ class InstructionSelector FINAL {
// generated for it.
bool IsDefined(Node* node) const;
- // Inform the instruction selection that {node} was just defined.
- void MarkAsDefined(Node* node);
-
// Checks if {node} has any uses, and therefore code has to be generated for
// it.
bool IsUsed(Node* node) const;
+ // Checks if {node} is currently live.
+ bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); }
+
+ private:
+ friend class OperandGenerator;
+
+ // Checks if {block} will appear directly after {current_block_} when
+ // assembling code, in which case, a fall-through can be used.
+ bool IsNextInAssemblyOrder(const BasicBlock* block) const;
+
+ // Inform the instruction selection that {node} was just defined.
+ void MarkAsDefined(Node* node);
+
// Inform the instruction selection that {node} has at least one use and we
// will need to generate code for it.
void MarkAsUsed(Node* node);
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698