Revision: 6342
Author: [email protected]
Date: Mon Jan 17 02:08:58 2011
Log: Remove unnecessary recording of temp operands in the register allocator.

When processing register contraints we used to add writable input operands
also as temp operands to the same instruction.

This does not seem necessary since we create a fresh virtual register
for writable inputs and insert a definition in the gap before the instruction.

Review URL: http://codereview.chromium.org/6350002
http://code.google.com/p/v8/source/detail?r=6342

Modified:
 /branches/bleeding_edge/src/lithium-allocator.cc

=======================================
--- /branches/bleeding_edge/src/lithium-allocator.cc Wed Jan 5 03:17:37 2011 +++ /branches/bleeding_edge/src/lithium-allocator.cc Mon Jan 17 02:08:58 2011
@@ -828,6 +828,10 @@
         AllocateFixed(cur_input, gap_index + 1, is_tagged);
         AddConstraintsGapMove(gap_index, input_copy, cur_input);
       } else if (cur_input->policy() == LUnallocated::WRITABLE_REGISTER) {
+ // The live range of writable input registers always goes until the end
+        // of the instruction.
+        ASSERT(!cur_input->IsUsedAtStart());
+
         LUnallocated* input_copy = cur_input->CopyUnconstrained();
         cur_input->set_virtual_register(next_virtual_register_++);

@@ -837,7 +841,6 @@
               cur_input->virtual_register() - first_artificial_register_);
         }

-        second->AddTemp(cur_input);
         AddConstraintsGapMove(gap_index, input_copy, cur_input);
       }
     }

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

Reply via email to