Reviewers: Toon Verwaest, Jakob,

Message:
PTAL

Description:
Reduce impact of HParameter and OSR entry inputs on HPhi representation
selection.

This is a follow-up to Issue 702053002 and Issue 807273003.

Patch 8a3aeb62d0 caused about 10% regression on Vellamo3.1-SurfWaxBinder because it made HPhis unable to choose any more optimistic representation than Tagged when a phi’s input is a parameter. I reduced the impact of patch 8a3aeb62d0 when
a parameter and OSR entry are the two inputs to a phi.

Please review this at https://codereview.chromium.org/1296423002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+5, -2 lines):
  M src/hydrogen-instructions.h
  M src/hydrogen-instructions.cc


Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 770d710a3acec403cd0227f39cb21fcd5c8db737..d63964788f840512b01605d6ead10340f43679a2 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -4451,7 +4451,9 @@ Representation HPhi::RepresentationFromInputs() {
   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;
+    if (has_type_feedback &&
+        InductionVariableData::IgnoreOsrValue(OperandAt(i))->IsParameter())
+      continue;

     r = r.generalize(OperandAt(i)->KnownOptimalRepresentation());
   }
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 807a65102940649f0cd132a30b2cef254810323f..4880289b1839e4a9b0d6a4eb5b732a81d2264c85 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3217,6 +3217,8 @@ class InductionVariableData final : public ZoneObject {

   int32_t ComputeUpperLimit(int32_t and_mask, int32_t or_mask);

+  static HValue* IgnoreOsrValue(HValue* v);
+
  private:
   template <class T> void swap(T* a, T* b) {
     T c(*a);
@@ -3236,7 +3238,6 @@ class InductionVariableData final : public ZoneObject {

   static int32_t ComputeIncrement(HPhi* phi, HValue* phi_operand);

-  static HValue* IgnoreOsrValue(HValue* v);
   static InductionVariableData* GetInductionVariableData(HValue* v);

   HPhi* phi_;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to