Commit 6e5e23d6 authored by titzer@chromium.org's avatar titzer@chromium.org

Implement global check elimination using the HFlowEngine.

BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/46883009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e066a366
This diff is collapsed.
......@@ -29,6 +29,7 @@
#define V8_HYDROGEN_CHECK_ELIMINATION_H_
#include "hydrogen.h"
#include "hydrogen-alias-analysis.h"
namespace v8 {
namespace internal {
......@@ -38,12 +39,33 @@ namespace internal {
class HCheckEliminationPhase : public HPhase {
public:
explicit HCheckEliminationPhase(HGraph* graph)
: HPhase("H_Check Elimination", graph) { }
: HPhase("H_Check Elimination", graph),
aliasing_(),
redundant_(0),
removed_(0),
narrowed_(0),
loads_(0),
empty_(0),
compares_true_(0),
compares_false_(0),
transitions_(0) { }
void Run();
friend class HCheckTable;
private:
void EliminateLocalChecks(HBasicBlock* block);
void PrintStats();
HAliasAnalyzer* aliasing_;
int redundant_;
int removed_;
int narrowed_;
int loads_;
int empty_;
int compares_true_;
int compares_false_;
int transitions_;
};
......
......@@ -3770,7 +3770,6 @@ bool HGraph::Optimize(BailoutReason* bailout_reason) {
// where unreachable code could unnecessarily defeat LICM.
Run<HMarkUnreachableBlocksPhase>();
if (FLAG_check_elimination) Run<HCheckEliminationPhase>();
if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>();
if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>();
......@@ -3801,6 +3800,8 @@ bool HGraph::Optimize(BailoutReason* bailout_reason) {
if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>();
if (FLAG_check_elimination) Run<HCheckEliminationPhase>();
if (FLAG_use_range) Run<HRangeAnalysisPhase>();
Run<HComputeChangeUndefinedToNaN>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment