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

Unified Diff: src/hydrogen-instructions.h

Issue 323423003: ARM: Avoid duplicate vmla when merging vmul and vadd (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index f1720f444247d83635c84d00a99cf2457ee0022e..e85c0e7b48341be82afb844628a64ade6c122987 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -663,6 +663,9 @@ class HValue : public ZoneObject {
void DeleteAndReplaceWith(HValue* other);
void ReplaceAllUsesWith(HValue* other);
bool HasNoUses() const { return use_list_ == NULL; }
+ bool HasOneUse() const {
+ return use_list_ != NULL && use_list_->tail() == NULL;
+ }
bool HasMultipleUses() const {
return use_list_ != NULL && use_list_->tail() != NULL;
}
@@ -3760,7 +3763,7 @@ class HBinaryOperation : public HTemplateInstruction<3> {
// Otherwise, if there is only one use of the right operand, it would be
// better off on the left for platforms that only have 2-arg arithmetic
// ops (e.g ia32, x64) that clobber the left operand.
- return right()->UseCount() == 1;
+ return right()->HasOneUse();
}
HValue* BetterLeftOperand() {
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698