Index: src/hydrogen-dce.h |
diff --git a/src/hydrogen-escape-analysis.h b/src/hydrogen-dce.h |
similarity index 79% |
copy from src/hydrogen-escape-analysis.h |
copy to src/hydrogen-dce.h |
index 6ba6e823c54f25f2ef4c45a13c9aedba37cfa566..19749f279a2e1cb632ba5a300033e5a9f038638f 100644 |
--- a/src/hydrogen-escape-analysis.h |
+++ b/src/hydrogen-dce.h |
@@ -25,33 +25,32 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-#ifndef V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
-#define V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
+#ifndef V8_HYDROGEN_DCE_H_ |
+#define V8_HYDROGEN_DCE_H_ |
-#include "allocation.h" |
#include "hydrogen.h" |
namespace v8 { |
namespace internal { |
-class HEscapeAnalysisPhase : public HPhase { |
+class HDeadCodeEliminationPhase : public HPhase { |
public: |
- explicit HEscapeAnalysisPhase(HGraph* graph) |
- : HPhase("H_Escape analysis", graph), captured_(0, zone()) { } |
+ explicit HDeadCodeEliminationPhase(HGraph* graph) |
+ : HPhase("H_Dead code elimination", graph) { } |
void Run() { |
- CollectCapturedValues(); |
+ MarkLiveInstructions(); |
+ RemoveDeadInstructions(); |
} |
private: |
- void CollectCapturedValues(); |
- void CollectIfNoEscapingUses(HInstruction* instr); |
- |
- ZoneList<HValue*> captured_; |
+ bool MarkLive(HValue* ref, HValue* instr); |
+ void MarkLiveInstructions(); |
+ void RemoveDeadInstructions(); |
}; |
} } // namespace v8::internal |
-#endif // V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
+#endif // V8_HYDROGEN_DCE_H_ |