Reviewers: Vyacheslav Egorov,

Description:
Remove unused policy from register allocator.

DefineSameAsAny is never used and currently does exactly the
same as DefineSameAsFirst.


Please review this at http://codereview.chromium.org/6025014/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/arm/lithium-arm.h
  M     src/arm/lithium-arm.cc
  M     src/ia32/lithium-ia32.h
  M     src/ia32/lithium-ia32.cc
  M     src/lithium-allocator.h
  M     src/lithium-allocator.cc


Index: src/arm/lithium-arm.cc
===================================================================
--- src/arm/lithium-arm.cc      (revision 6155)
+++ src/arm/lithium-arm.cc      (working copy)
@@ -767,11 +767,6 @@
 }


-LInstruction* LChunkBuilder::DefineSameAsAny(LInstruction* instr) {
-  return Define(instr, new LUnallocated(LUnallocated::SAME_AS_ANY_INPUT));
-}
-
-
 LInstruction* LChunkBuilder::DefineSameAsFirst(LInstruction* instr) {
return Define(instr, new LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
 }
Index: src/arm/lithium-arm.h
===================================================================
--- src/arm/lithium-arm.h       (revision 6155)
+++ src/arm/lithium-arm.h       (working copy)
@@ -2076,7 +2076,6 @@
   LInstruction* Define(LInstruction* instr);
   LInstruction* DefineAsRegister(LInstruction* instr);
   LInstruction* DefineAsSpilled(LInstruction* instr, int index);
-  LInstruction* DefineSameAsAny(LInstruction* instr);
   LInstruction* DefineSameAsFirst(LInstruction* instr);
   LInstruction* DefineFixed(LInstruction* instr, Register reg);
   LInstruction* DefineFixedDouble(LInstruction* instr, DoubleRegister reg);
Index: src/ia32/lithium-ia32.cc
===================================================================
--- src/ia32/lithium-ia32.cc    (revision 6155)
+++ src/ia32/lithium-ia32.cc    (working copy)
@@ -767,11 +767,6 @@
 }


-LInstruction* LChunkBuilder::DefineSameAsAny(LInstruction* instr) {
-  return Define(instr, new LUnallocated(LUnallocated::SAME_AS_ANY_INPUT));
-}
-
-
 LInstruction* LChunkBuilder::DefineSameAsFirst(LInstruction* instr) {
return Define(instr, new LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
 }
Index: src/ia32/lithium-ia32.h
===================================================================
--- src/ia32/lithium-ia32.h     (revision 6155)
+++ src/ia32/lithium-ia32.h     (working copy)
@@ -2087,7 +2087,6 @@
   LInstruction* Define(LInstruction* instr);
   LInstruction* DefineAsRegister(LInstruction* instr);
   LInstruction* DefineAsSpilled(LInstruction* instr, int index);
-  LInstruction* DefineSameAsAny(LInstruction* instr);
   LInstruction* DefineSameAsFirst(LInstruction* instr);
   LInstruction* DefineFixed(LInstruction* instr, Register reg);
   LInstruction* DefineFixedDouble(LInstruction* instr, XMMRegister reg);
Index: src/lithium-allocator.cc
===================================================================
--- src/lithium-allocator.cc    (revision 6155)
+++ src/lithium-allocator.cc    (working copy)
@@ -106,9 +106,6 @@
         case LUnallocated::SAME_AS_FIRST_INPUT:
           stream->Add("(1)");
           break;
-        case LUnallocated::SAME_AS_ANY_INPUT:
-          stream->Add("(A)");
-          break;
         case LUnallocated::ANY:
           stream->Add("(-)");
           break;
Index: src/lithium-allocator.h
===================================================================
--- src/lithium-allocator.h     (revision 6155)
+++ src/lithium-allocator.h     (working copy)
@@ -205,7 +205,6 @@
     MUST_HAVE_REGISTER,
     WRITABLE_REGISTER,
     SAME_AS_FIRST_INPUT,
-    SAME_AS_ANY_INPUT,
     IGNORE
   };

@@ -276,7 +275,7 @@
     return policy() == WRITABLE_REGISTER || policy() == MUST_HAVE_REGISTER;
   }
   bool HasSameAsInputPolicy() const {
- return policy() == SAME_AS_FIRST_INPUT || policy() == SAME_AS_ANY_INPUT;
+    return policy() == SAME_AS_FIRST_INPUT;
   }
   Policy policy() const { return PolicyField::decode(value_); }
   void set_policy(Policy policy) {


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to