Revision: 17240
Author: [email protected]
Date: Wed Oct 16 13:19:46 2013 UTC
Log: Remove dead constants not in block #0.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/27473004
http://code.google.com/p/v8/source/detail?r=17240
Modified:
/branches/bleeding_edge/src/hydrogen-dce.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-dce.cc Mon Oct 14 13:32:02 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-dce.cc Wed Oct 16 13:19:46 2013 UTC
@@ -97,10 +97,12 @@
for (HInstructionIterator it(block); !it.Done(); it.Advance()) {
HInstruction* instr = it.Current();
if (!instr->CheckFlag(HValue::kIsLive)) {
- // Instruction has not been marked live; assume it is dead and
remove.
- // TODO(titzer): we don't remove constants because some special
ones
- // might be used by later phases and are assumed to be in the graph
- if (!instr->IsConstant()) instr->DeleteAndReplaceWith(NULL);
+ // Instruction has not been marked live, so remove it.
+ if (!instr->IsConstant() || instr->block()->block_id() != 0) {
+ // TODO(titzer): Some global constants in block 0 can be used
+ // again later, and can't currently be removed. Fix that.
+ instr->DeleteAndReplaceWith(NULL);
+ }
} else {
// Clear the liveness flag to leave the graph clean for the next
DCE.
instr->ClearFlag(HValue::kIsLive);
--
--
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/groups/opt_out.