Revision: 17235
Author: [email protected]
Date: Wed Oct 16 09:16:56 2013 UTC
Log: Implement fixpoint iteration for escape analysis.
[email protected]
Review URL: https://codereview.chromium.org/23533003
http://code.google.com/p/v8/source/detail?r=17235
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/hydrogen-escape-analysis.cc
/branches/bleeding_edge/src/hydrogen-instructions.cc
/branches/bleeding_edge/src/hydrogen-instructions.h
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Wed Oct 16 08:10:36 2013
UTC
+++ /branches/bleeding_edge/src/flag-definitions.h Wed Oct 16 09:16:56 2013
UTC
@@ -313,6 +313,8 @@
DEFINE_bool(inline_arguments, true, "inline functions with arguments
object")
DEFINE_bool(inline_accessors, true, "inline JavaScript accessors")
DEFINE_int(loop_weight, 1, "loop weight for representation inference")
+DEFINE_int(escape_analysis_iterations, 1,
+ "maximum number of escape analysis fix-point iterations")
DEFINE_bool(optimize_for_in, true,
"optimize functions containing for-in loops")
=======================================
--- /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Thu Sep 19
09:07:27 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Wed Oct 16
09:16:56 2013 UTC
@@ -306,7 +306,7 @@
number_of_objects_++;
block_states_.Clear();
- // Perform actual analysis steps.
+ // Perform actual analysis step.
AnalyzeDataFlow(allocate);
cumulative_values_ += number_of_values_;
@@ -320,8 +320,13 @@
// TODO(mstarzinger): We disable escape analysis with OSR for now,
because
// spill slots might be uninitialized. Needs investigation.
if (graph()->has_osr()) return;
- CollectCapturedValues();
- PerformScalarReplacement();
+ int max_fixpoint_iteration_count = FLAG_escape_analysis_iterations;
+ for (int i = 0; i < max_fixpoint_iteration_count; i++) {
+ CollectCapturedValues();
+ if (captured_.is_empty()) break;
+ PerformScalarReplacement();
+ captured_.Clear();
+ }
}
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Oct 10
09:35:35 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Wed Oct 16
09:16:56 2013 UTC
@@ -2394,6 +2394,12 @@
env = env->outer();
}
}
+
+
+void HCapturedObject::PrintDataTo(StringStream* stream) {
+ stream->Add("#%d ", capture_id());
+ HDematerializedObject::PrintDataTo(stream);
+}
void HEnterInlined::RegisterReturnTarget(HBasicBlock* return_target,
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Thu Oct 10 20:01:42
2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Wed Oct 16 09:16:56
2013 UTC
@@ -3317,6 +3317,8 @@
// Replay effects of this instruction on the given environment.
void ReplayEnvironment(HEnvironment* env);
+ virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
+
DECLARE_CONCRETE_INSTRUCTION(CapturedObject)
private:
--
--
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.