| Index: src/hydrogen-escape-analysis.h
|
| diff --git a/src/hydrogen-escape-analysis.h b/src/hydrogen-escape-analysis.h
|
| index 6ba6e823c54f25f2ef4c45a13c9aedba37cfa566..123da214e3401ce960a8372fd88ad157ca84b0c6 100644
|
| --- a/src/hydrogen-escape-analysis.h
|
| +++ b/src/hydrogen-escape-analysis.h
|
| @@ -38,17 +38,48 @@ namespace internal {
|
| class HEscapeAnalysisPhase : public HPhase {
|
| public:
|
| explicit HEscapeAnalysisPhase(HGraph* graph)
|
| - : HPhase("H_Escape analysis", graph), captured_(0, zone()) { }
|
| + : HPhase("H_Escape analysis", graph),
|
| + captured_(0, zone()),
|
| + number_of_values_(0),
|
| + cumulative_values_(0),
|
| + block_states_(graph->blocks()->length(), zone()) { }
|
|
|
| void Run() {
|
| CollectCapturedValues();
|
| + PerformScalarReplacement();
|
| }
|
|
|
| private:
|
| void CollectCapturedValues();
|
| void CollectIfNoEscapingUses(HInstruction* instr);
|
| + void PerformScalarReplacement();
|
| + void AnalyzeDataFlow(HInstruction* instr);
|
|
|
| - ZoneList<HValue*> captured_;
|
| + HCapturedObject* NewState(HInstruction* prev);
|
| + HCapturedObject* NewStateForAllocation(HInstruction* prev);
|
| + HCapturedObject* NewStateForLoopHeader(HInstruction* prev, HCapturedObject*);
|
| + HCapturedObject* NewStateCopy(HInstruction* prev, HCapturedObject* state);
|
| +
|
| + HPhi* NewPhiAndInsert(HBasicBlock* block, HValue* incoming_value, int index);
|
| +
|
| + HCapturedObject* StateAt(HBasicBlock* block) {
|
| + return block_states_.at(block->block_id());
|
| + }
|
| +
|
| + void SetStateAt(HBasicBlock* block, HCapturedObject* state) {
|
| + block_states_.Set(block->block_id(), state);
|
| + }
|
| +
|
| + // List of allocations captured during collection phase.
|
| + ZoneList<HInstruction*> captured_;
|
| +
|
| + // Number of scalar values tracked during scalar replacement phase.
|
| + int number_of_values_;
|
| + int cumulative_values_;
|
| +
|
| + // Map of block IDs to the data-flow state at block entry during the
|
| + // scalar replacement phase.
|
| + ZoneList<HCapturedObject*> block_states_;
|
| };
|
|
|
|
|
|
|