Commit d5d7b1d9 authored by danno@chromium.org's avatar danno@chromium.org

Tweak HConstant::EmitAtUses() to eliminate useless constant generation

BUG=2881
R=danno@chromium.org

Review URL: https://codereview.chromium.org/23811011

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 73b03b89
......@@ -2526,9 +2526,11 @@ void HConstant::Initialize(Representation r) {
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment