OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 cumulative_values_(0), | 45 cumulative_values_(0), |
46 block_states_(graph->blocks()->length(), zone()) { } | 46 block_states_(graph->blocks()->length(), zone()) { } |
47 | 47 |
48 void Run() { | 48 void Run() { |
49 CollectCapturedValues(); | 49 CollectCapturedValues(); |
50 PerformScalarReplacement(); | 50 PerformScalarReplacement(); |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 void CollectCapturedValues(); | 54 void CollectCapturedValues(); |
55 void CollectIfNoEscapingUses(HInstruction* instr); | 55 bool HasNoEscapingUses(HValue* value); |
56 void PerformScalarReplacement(); | 56 void PerformScalarReplacement(); |
57 void AnalyzeDataFlow(HInstruction* instr); | 57 void AnalyzeDataFlow(HInstruction* instr); |
58 | 58 |
59 HCapturedObject* NewState(HInstruction* prev); | 59 HCapturedObject* NewState(HInstruction* prev); |
60 HCapturedObject* NewStateForAllocation(HInstruction* prev); | 60 HCapturedObject* NewStateForAllocation(HInstruction* prev); |
61 HCapturedObject* NewStateForLoopHeader(HInstruction* prev, HCapturedObject*); | 61 HCapturedObject* NewStateForLoopHeader(HInstruction* prev, HCapturedObject*); |
62 HCapturedObject* NewStateCopy(HInstruction* prev, HCapturedObject* state); | 62 HCapturedObject* NewStateCopy(HInstruction* prev, HCapturedObject* state); |
63 | 63 |
64 HPhi* NewPhiAndInsert(HBasicBlock* block, HValue* incoming_value, int index); | 64 HPhi* NewPhiAndInsert(HBasicBlock* block, HValue* incoming_value, int index); |
65 | 65 |
(...skipping 19 matching lines...) Expand all Loading... |
85 | 85 |
86 // Map of block IDs to the data-flow state at block entry during the | 86 // Map of block IDs to the data-flow state at block entry during the |
87 // scalar replacement phase. | 87 // scalar replacement phase. |
88 ZoneList<HCapturedObject*> block_states_; | 88 ZoneList<HCapturedObject*> block_states_; |
89 }; | 89 }; |
90 | 90 |
91 | 91 |
92 } } // namespace v8::internal | 92 } } // namespace v8::internal |
93 | 93 |
94 #endif // V8_HYDROGEN_ESCAPE_ANALYSIS_H_ | 94 #endif // V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
OLD | NEW |