Revision: 16731
Author: [email protected]
Date: Mon Sep 16 12:41:05 2013 UTC
Log: Tweak HConstant::EmitAtUses() to eliminate useless constant
generation
BUG=2881
[email protected]
Review URL: https://codereview.chromium.org/23811011
Patch from Weiliang Lin <[email protected]>.
http://code.google.com/p/v8/source/detail?r=16731
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Wed Sep 11
13:00:27 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Sep 16
12:41:05 2013 UTC
@@ -2526,9 +2526,11 @@
bool HConstant::EmitAtUses() {
ASSERT(IsLinked());
- if (block()->graph()->has_osr()) {
- return block()->graph()->IsStandardConstant(this);
+ if (block()->graph()->has_osr() &&
+ block()->graph()->IsStandardConstant(this)) {
+ return true;
}
+ if (UseCount() == 0) return true;
if (IsCell()) return false;
if (representation().IsDouble()) return false;
return true;
--
--
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.