Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1530)

Unified Diff: src/compiler/pipeline.cc

Issue 2135123002: [turbofan] Eliminate a few redundant bounds checks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix BranchElimination to play well with the other reducers. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/branch-elimination.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index c4e5032b7b719bb13756d7c2101e49337223c122..f2cf50f3f1666d834060d2b46429eb652db5a8f9 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -919,22 +919,6 @@ struct TypedLoweringPhase {
};
-struct BranchEliminationPhase {
- static const char* phase_name() { return "branch condition elimination"; }
-
- void Run(PipelineData* data, Zone* temp_zone) {
- JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
- BranchElimination branch_condition_elimination(&graph_reducer,
- data->jsgraph(), temp_zone);
- DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
- data->common());
- AddReducer(data, &graph_reducer, &branch_condition_elimination);
- AddReducer(data, &graph_reducer, &dead_code_elimination);
- graph_reducer.ReduceGraph();
- }
-};
-
-
struct EscapeAnalysisPhase {
static const char* phase_name() { return "escape analysis"; }
@@ -1077,6 +1061,8 @@ struct LateOptimizationPhase {
void Run(PipelineData* data, Zone* temp_zone) {
JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
+ BranchElimination branch_condition_elimination(&graph_reducer,
+ data->jsgraph(), temp_zone);
DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
data->common());
ValueNumberingReducer value_numbering(temp_zone);
@@ -1086,6 +1072,7 @@ struct LateOptimizationPhase {
SelectLowering select_lowering(data->jsgraph()->graph(),
data->jsgraph()->common());
TailCallOptimization tco(data->common(), data->graph());
+ AddReducer(data, &graph_reducer, &branch_condition_elimination);
AddReducer(data, &graph_reducer, &dead_code_elimination);
AddReducer(data, &graph_reducer, &value_numbering);
AddReducer(data, &graph_reducer, &machine_reducer);
@@ -1511,9 +1498,6 @@ bool PipelineImpl::OptimizeGraph(Linkage* linkage) {
RunPrintAndVerify("Store-store elimination", true);
}
- Run<BranchEliminationPhase>();
- RunPrintAndVerify("Branch conditions eliminated", true);
-
// Optimize control flow.
if (FLAG_turbo_cf_optimization) {
Run<ControlFlowOptimizationPhase>();
« no previous file with comments | « src/compiler/branch-elimination.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698