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

Unified Diff: src/hydrogen-instructions.cc

Issue 807273003: Reduce impact of HParameter inputs on HPhi representation selection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 1c3e1f3956d3e7cba96055054d8a2321a54998f2..dc2b6b8276735a2fb9b60cb2a15f52489fa2fc61 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -4497,18 +4497,24 @@ void HPhi::SimplifyConstantInputs() {
void HPhi::InferRepresentation(HInferRepresentationPhase* h_infer) {
DCHECK(CheckFlag(kFlexibleRepresentation));
- Representation new_rep = RepresentationFromInputs();
- UpdateRepresentation(new_rep, h_infer, "inputs");
- new_rep = RepresentationFromUses();
+ Representation new_rep = RepresentationFromUses();
UpdateRepresentation(new_rep, h_infer, "uses");
+ new_rep = RepresentationFromInputs();
+ UpdateRepresentation(new_rep, h_infer, "inputs");
new_rep = RepresentationFromUseRequirements();
UpdateRepresentation(new_rep, h_infer, "use requirements");
}
Representation HPhi::RepresentationFromInputs() {
- Representation r = Representation::None();
+ bool has_type_feedback =
+ smi_non_phi_uses() + int32_non_phi_uses() + double_non_phi_uses() > 0;
+ Representation r = representation();
for (int i = 0; i < OperandCount(); ++i) {
+ // Ignore conservative Tagged assumption of parameters if we have
+ // reason to believe that it's too conservative.
+ if (has_type_feedback && OperandAt(i)->IsParameter()) continue;
+
r = r.generalize(OperandAt(i)->KnownOptimalRepresentation());
}
return r;
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698