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.cc

Issue 738073002: [turbofan]: More optimizations to add and subtract operations on x64 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 567b1c920f00ff86273dec94e4e4fb6ea5356330..9acdcc84cf38e70458cace12b8b871717f7719fa 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -154,6 +154,22 @@ bool InstructionSelector::IsNextInAssemblyOrder(const BasicBlock* block) const {
}
+bool InstructionSelector::ValueOwnedBy(Node* owner, Node* value) const {
titzer 2014/11/20 12:39:24 Maybe we can move this to a more generic location
danno 2014/11/20 13:43:07 As discussed, the new patch set uses IsLive rather
+ Node::Uses uses = value->uses();
+ bool found_use = false;
+ for (Node::Uses::iterator current = uses.begin(); current != uses.end();
titzer 2014/11/20 12:39:24 You can use a C++ foreach here now!
+ ++current) {
+ Node* use = *current;
+ if (use == owner) {
+ found_use = true;
+ } else if (!NodeProperties::IsEffectEdge(current.edge())) {
+ return false;
+ }
+ }
+ return found_use;
+}
+
+
bool InstructionSelector::CanCover(Node* user, Node* node) const {
return node->OwnedBy(user) &&
schedule()->block(node) == schedule()->block(user);
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698