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

Side by Side Diff: src/hydrogen.cc

Issue 21055011: First implementation of allocation elimination in Hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Minor cleanup. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2942 #ifdef DEBUG 2942 #ifdef DEBUG
2943 // Do a full verify after building the graph and computing dominators. 2943 // Do a full verify after building the graph and computing dominators.
2944 Verify(true); 2944 Verify(true);
2945 #endif 2945 #endif
2946 2946
2947 if (FLAG_analyze_environment_liveness && maximum_environment_size() != 0) { 2947 if (FLAG_analyze_environment_liveness && maximum_environment_size() != 0) {
2948 Run<HEnvironmentLivenessAnalysisPhase>(); 2948 Run<HEnvironmentLivenessAnalysisPhase>();
2949 } 2949 }
2950 2950
2951 Run<HPropagateDeoptimizingMarkPhase>(); 2951 Run<HPropagateDeoptimizingMarkPhase>();
2952
titzer 2013/08/01 17:11:50 whitespace change
Michael Starzinger 2013/08/05 15:13:00 Done. Removed. Even though I think there should be
2952 if (!CheckConstPhiUses()) { 2953 if (!CheckConstPhiUses()) {
2953 *bailout_reason = SmartArrayPointer<char>(StrDup( 2954 *bailout_reason = SmartArrayPointer<char>(StrDup(
2954 "Unsupported phi use of const variable")); 2955 "Unsupported phi use of const variable"));
2955 return false; 2956 return false;
2956 } 2957 }
2957 Run<HRedundantPhiEliminationPhase>(); 2958 Run<HRedundantPhiEliminationPhase>();
2958 if (!CheckArgumentsPhiUses()) { 2959 if (!CheckArgumentsPhiUses()) {
2959 *bailout_reason = SmartArrayPointer<char>(StrDup( 2960 *bailout_reason = SmartArrayPointer<char>(StrDup(
2960 "Unsupported phi use of arguments")); 2961 "Unsupported phi use of arguments"));
2961 return false; 2962 return false;
2962 } 2963 }
2963 2964
2965 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>();
2966
2964 // Remove dead code and phis 2967 // Remove dead code and phis
2965 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>(); 2968 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>();
2966 CollectPhis(); 2969 CollectPhis();
2967 2970
2968 if (has_osr()) osr()->FinishOsrValues(); 2971 if (has_osr()) osr()->FinishOsrValues();
2969 2972
2970 Run<HInferRepresentationPhase>(); 2973 Run<HInferRepresentationPhase>();
2971 2974
2972 // Remove HSimulate instructions that have turned out not to be needed 2975 // Remove HSimulate instructions that have turned out not to be needed
2973 // after all by folding them into the following HSimulate. 2976 // after all by folding them into the following HSimulate.
2974 // This must happen after inferring representations. 2977 // This must happen after inferring representations.
2975 Run<HMergeRemovableSimulatesPhase>(); 2978 Run<HMergeRemovableSimulatesPhase>();
2976 2979
2977 Run<HMarkDeoptimizeOnUndefinedPhase>(); 2980 Run<HMarkDeoptimizeOnUndefinedPhase>();
2978 Run<HRepresentationChangesPhase>(); 2981 Run<HRepresentationChangesPhase>();
2979 2982
2980 Run<HInferTypesPhase>(); 2983 Run<HInferTypesPhase>();
2981 2984
2982 // Must be performed before canonicalization to ensure that Canonicalize 2985 // Must be performed before canonicalization to ensure that Canonicalize
2983 // will not remove semantically meaningful ToInt32 operations e.g. BIT_OR with 2986 // will not remove semantically meaningful ToInt32 operations e.g. BIT_OR with
2984 // zero. 2987 // zero.
2985 if (FLAG_opt_safe_uint32_operations) Run<HUint32AnalysisPhase>(); 2988 if (FLAG_opt_safe_uint32_operations) Run<HUint32AnalysisPhase>();
2986 2989
2987 if (FLAG_use_canonicalizing) Run<HCanonicalizePhase>(); 2990 if (FLAG_use_canonicalizing) Run<HCanonicalizePhase>();
2988 2991
2989 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>();
2990
2991 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>(); 2992 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>();
2992 2993
2993 if (FLAG_use_range) Run<HRangeAnalysisPhase>(); 2994 if (FLAG_use_range) Run<HRangeAnalysisPhase>();
2994 2995
2995 Run<HComputeMinusZeroChecksPhase>(); 2996 Run<HComputeMinusZeroChecksPhase>();
2996 2997
2997 // Eliminate redundant stack checks on backwards branches. 2998 // Eliminate redundant stack checks on backwards branches.
2998 Run<HStackCheckEliminationPhase>(); 2999 Run<HStackCheckEliminationPhase>();
2999 3000
3000 if (FLAG_idefs) SetupInformativeDefinitions(); 3001 if (FLAG_idefs) SetupInformativeDefinitions();
(...skipping 6886 matching lines...) Expand 10 before | Expand all | Expand 10 after
9887 if (ShouldProduceTraceOutput()) { 9888 if (ShouldProduceTraceOutput()) {
9888 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9889 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9889 } 9890 }
9890 9891
9891 #ifdef DEBUG 9892 #ifdef DEBUG
9892 graph_->Verify(false); // No full verify. 9893 graph_->Verify(false); // No full verify.
9893 #endif 9894 #endif
9894 } 9895 }
9895 9896
9896 } } // namespace v8::internal 9897 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen-escape-analysis.h » ('j') | src/hydrogen-escape-analysis.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698