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

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: Rebased. 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
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen-escape-analysis.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 return false; 2909 return false;
2910 } 2910 }
2911 Run<HRedundantPhiEliminationPhase>(); 2911 Run<HRedundantPhiEliminationPhase>();
2912 if (!CheckArgumentsPhiUses()) { 2912 if (!CheckArgumentsPhiUses()) {
2913 *bailout_reason = kUnsupportedPhiUseOfArguments; 2913 *bailout_reason = kUnsupportedPhiUseOfArguments;
2914 return false; 2914 return false;
2915 } 2915 }
2916 2916
2917 // Remove dead code and phis 2917 // Remove dead code and phis
2918 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>(); 2918 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>();
2919
2920 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>();
2921
2919 CollectPhis(); 2922 CollectPhis();
2920 2923
2921 if (has_osr()) osr()->FinishOsrValues(); 2924 if (has_osr()) osr()->FinishOsrValues();
2922 2925
2923 Run<HInferRepresentationPhase>(); 2926 Run<HInferRepresentationPhase>();
2924 2927
2925 // Remove HSimulate instructions that have turned out not to be needed 2928 // Remove HSimulate instructions that have turned out not to be needed
2926 // after all by folding them into the following HSimulate. 2929 // after all by folding them into the following HSimulate.
2927 // This must happen after inferring representations. 2930 // This must happen after inferring representations.
2928 Run<HMergeRemovableSimulatesPhase>(); 2931 Run<HMergeRemovableSimulatesPhase>();
2929 2932
2930 Run<HMarkDeoptimizeOnUndefinedPhase>(); 2933 Run<HMarkDeoptimizeOnUndefinedPhase>();
2931 Run<HRepresentationChangesPhase>(); 2934 Run<HRepresentationChangesPhase>();
2932 2935
2933 Run<HInferTypesPhase>(); 2936 Run<HInferTypesPhase>();
2934 2937
2935 // Must be performed before canonicalization to ensure that Canonicalize 2938 // Must be performed before canonicalization to ensure that Canonicalize
2936 // will not remove semantically meaningful ToInt32 operations e.g. BIT_OR with 2939 // will not remove semantically meaningful ToInt32 operations e.g. BIT_OR with
2937 // zero. 2940 // zero.
2938 if (FLAG_opt_safe_uint32_operations) Run<HUint32AnalysisPhase>(); 2941 if (FLAG_opt_safe_uint32_operations) Run<HUint32AnalysisPhase>();
2939 2942
2940 if (FLAG_use_canonicalizing) Run<HCanonicalizePhase>(); 2943 if (FLAG_use_canonicalizing) Run<HCanonicalizePhase>();
2941 2944
2942 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>();
2943
2944 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>(); 2945 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>();
2945 2946
2946 if (FLAG_use_range) Run<HRangeAnalysisPhase>(); 2947 if (FLAG_use_range) Run<HRangeAnalysisPhase>();
2947 2948
2948 Run<HComputeMinusZeroChecksPhase>(); 2949 Run<HComputeMinusZeroChecksPhase>();
2949 2950
2950 // Eliminate redundant stack checks on backwards branches. 2951 // Eliminate redundant stack checks on backwards branches.
2951 Run<HStackCheckEliminationPhase>(); 2952 Run<HStackCheckEliminationPhase>();
2952 2953
2953 if (FLAG_array_bounds_checks_elimination) { 2954 if (FLAG_array_bounds_checks_elimination) {
(...skipping 6752 matching lines...) Expand 10 before | Expand all | Expand 10 after
9706 if (ShouldProduceTraceOutput()) { 9707 if (ShouldProduceTraceOutput()) {
9707 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9708 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9708 } 9709 }
9709 9710
9710 #ifdef DEBUG 9711 #ifdef DEBUG
9711 graph_->Verify(false); // No full verify. 9712 graph_->Verify(false); // No full verify.
9712 #endif 9713 #endif
9713 } 9714 }
9714 9715
9715 } } // namespace v8::internal 9716 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen-escape-analysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698