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

Unified Diff: src/fast-codegen.cc

Issue 603004: Add last use data flow information to the fast code generator.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/data-flow.cc ('k') | test/mjsunit/compiler/simple-binary-op.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-codegen.cc
===================================================================
--- src/fast-codegen.cc (revision 3827)
+++ src/fast-codegen.cc (working copy)
@@ -428,6 +428,9 @@
AstLabeler labeler;
labeler.Label(info);
+ LivenessAnalyzer analyzer;
+ analyzer.Analyze(info->function());
+
CodeGenerator::MakeCodePrologue(info);
const int kInitialBufferSize = 4 * KB;
@@ -584,7 +587,8 @@
Comment cmnt(masm(), ";; Global");
if (FLAG_print_ir) {
SmartPointer<char> name = expr->name()->ToCString();
- PrintF("%d: t%d = Global(%s)\n", expr->num(), expr->num(), *name);
+ PrintF("%d: t%d = Global(%s) // last_use = %d\n", expr->num(),
+ expr->num(), *name, expr->var_def()->last_use()->num());
}
EmitGlobalVariableLoad(cell);
}
@@ -638,7 +642,9 @@
SmartPointer<char> name_string = name->ToCString();
PrintF("%d: ", expr->num());
if (!destination().is(no_reg)) PrintF("t%d = ", expr->num());
- PrintF("Store(this, \"%s\", t%d)\n", *name_string, expr->value()->num());
+ PrintF("Store(this, \"%s\", t%d) // last_use(this) = %d\n", *name_string,
+ expr->value()->num(),
+ expr->var_def()->last_use()->num());
}
EmitThisPropertyStore(name);
@@ -661,8 +667,9 @@
Comment cmnt(masm(), ";; Load from this");
if (FLAG_print_ir) {
SmartPointer<char> name_string = name->ToCString();
- PrintF("%d: t%d = Load(this, \"%s\")\n",
- expr->num(), expr->num(), *name_string);
+ PrintF("%d: t%d = Load(this, \"%s\") // last_use(this) = %d\n",
+ expr->num(), expr->num(), *name_string,
+ expr->var_def()->last_use()->num());
}
EmitThisPropertyLoad(name);
}
« no previous file with comments | « src/data-flow.cc ('k') | test/mjsunit/compiler/simple-binary-op.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698