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

Unified Diff: src/hydrogen-escape-analysis.cc

Issue 18476004: Turn escape analysis into a proper HPhase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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-escape-analysis.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-escape-analysis.cc
diff --git a/src/hydrogen-escape-analysis.cc b/src/hydrogen-escape-analysis.cc
index 59151ad10196fae2e27fdb37a0c0a32141fd9519..e852fb8d6d75d7756df6e4e03399bfb8789d4c76 100644
--- a/src/hydrogen-escape-analysis.cc
+++ b/src/hydrogen-escape-analysis.cc
@@ -31,7 +31,7 @@ namespace v8 {
namespace internal {
-void HEscapeAnalysis::CollectIfNoEscapingUses(HInstruction* instr) {
+void HEscapeAnalysisPhase::CollectIfNoEscapingUses(HInstruction* instr) {
for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
HValue* use = it.value();
if (use->HasEscapingOperandAt(it.index())) {
@@ -45,14 +45,14 @@ void HEscapeAnalysis::CollectIfNoEscapingUses(HInstruction* instr) {
if (FLAG_trace_escape_analysis) {
PrintF("#%d (%s) is being captured\n", instr->id(), instr->Mnemonic());
}
- captured_.Add(instr, zone_);
+ captured_.Add(instr, zone());
}
-void HEscapeAnalysis::CollectCapturedValues() {
- int block_count = graph_->blocks()->length();
+void HEscapeAnalysisPhase::CollectCapturedValues() {
+ int block_count = graph()->blocks()->length();
for (int i = 0; i < block_count; ++i) {
- HBasicBlock* block = graph_->blocks()->at(i);
+ HBasicBlock* block = graph()->blocks()->at(i);
for (HInstructionIterator it(block); !it.Done(); it.Advance()) {
HInstruction* instr = it.Current();
if (instr->IsAllocate() || instr->IsAllocateObject()) {
@@ -63,10 +63,4 @@ void HEscapeAnalysis::CollectCapturedValues() {
}
-void HEscapeAnalysis::Analyze() {
- HPhase phase("H_Escape analysis", graph_);
- CollectCapturedValues();
-}
-
-
} } // namespace v8::internal
« no previous file with comments | « src/hydrogen-escape-analysis.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698