Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: src/hydrogen-instructions.cc

Issue 131223009: Delete useless --loop-weight flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 4e614d875218f2c48f7f050d6ea8680d7de9533d..330556a239f9f733ef7c0edab11d04bffd7c2861 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -54,14 +54,6 @@ HYDROGEN_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
#undef DEFINE_COMPILE
-int HValue::LoopWeight() const {
- const int w = FLAG_loop_weight;
- static const int weights[] = { 1, w, w*w, w*w*w, w*w*w*w };
- return weights[Min(block()->LoopNestingDepth(),
- static_cast<int>(ARRAY_SIZE(weights)-1))];
-}
-
-
Isolate* HValue::isolate() const {
ASSERT(block() != NULL);
return block()->isolate();
@@ -106,7 +98,7 @@ Representation HValue::RepresentationFromUses() {
id(), Mnemonic(), use->id(), use->Mnemonic(), rep.Mnemonic(),
(use->CheckFlag(kTruncatingToInt32) ? "-trunc" : ""));
}
- use_count[rep.kind()] += use->LoopWeight();
+ use_count[rep.kind()] += 1;
}
if (IsPhi()) HPhi::cast(this)->AddIndirectUsesTo(&use_count[0]);
int tagged_count = use_count[Representation::kTagged];
@@ -2357,7 +2349,7 @@ void HPhi::InitRealUses(int phi_id) {
HValue* value = it.value();
if (!value->IsPhi()) {
Representation rep = value->observed_input_representation(it.index());
- non_phi_uses_[rep.kind()] += value->LoopWeight();
+ non_phi_uses_[rep.kind()] += 1;
if (FLAG_trace_representation) {
PrintF("#%d Phi is used by real #%d %s as %s\n",
id(), value->id(), value->Mnemonic(), rep.Mnemonic());
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698