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

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: Ported to x64 and ARM architectures. 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 2943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 "Unsupported phi use of const variable")); 2954 "Unsupported phi use of const variable"));
2955 return false; 2955 return false;
2956 } 2956 }
2957 Run<HRedundantPhiEliminationPhase>(); 2957 Run<HRedundantPhiEliminationPhase>();
2958 if (!CheckArgumentsPhiUses()) { 2958 if (!CheckArgumentsPhiUses()) {
2959 *bailout_reason = SmartArrayPointer<char>(StrDup( 2959 *bailout_reason = SmartArrayPointer<char>(StrDup(
2960 "Unsupported phi use of arguments")); 2960 "Unsupported phi use of arguments"));
2961 return false; 2961 return false;
2962 } 2962 }
2963 2963
2964 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>();
titzer 2013/08/06 12:15:47 I think you might want to run after the first DCE
Michael Starzinger 2013/08/07 10:51:16 Done. Moved to after DCE.
2965
2964 // Remove dead code and phis 2966 // Remove dead code and phis
2965 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>(); 2967 if (FLAG_dead_code_elimination) Run<HDeadCodeEliminationPhase>();
2966 CollectPhis(); 2968 CollectPhis();
2967 2969
2968 if (has_osr()) osr()->FinishOsrValues(); 2970 if (has_osr()) osr()->FinishOsrValues();
2969 2971
2970 Run<HInferRepresentationPhase>(); 2972 Run<HInferRepresentationPhase>();
2971 2973
2972 // Remove HSimulate instructions that have turned out not to be needed 2974 // Remove HSimulate instructions that have turned out not to be needed
2973 // after all by folding them into the following HSimulate. 2975 // after all by folding them into the following HSimulate.
2974 // This must happen after inferring representations. 2976 // This must happen after inferring representations.
2975 Run<HMergeRemovableSimulatesPhase>(); 2977 Run<HMergeRemovableSimulatesPhase>();
2976 2978
2977 Run<HMarkDeoptimizeOnUndefinedPhase>(); 2979 Run<HMarkDeoptimizeOnUndefinedPhase>();
2978 Run<HRepresentationChangesPhase>(); 2980 Run<HRepresentationChangesPhase>();
2979 2981
2980 Run<HInferTypesPhase>(); 2982 Run<HInferTypesPhase>();
2981 2983
2982 // Must be performed before canonicalization to ensure that Canonicalize 2984 // Must be performed before canonicalization to ensure that Canonicalize
2983 // will not remove semantically meaningful ToInt32 operations e.g. BIT_OR with 2985 // will not remove semantically meaningful ToInt32 operations e.g. BIT_OR with
2984 // zero. 2986 // zero.
2985 if (FLAG_opt_safe_uint32_operations) Run<HUint32AnalysisPhase>(); 2987 if (FLAG_opt_safe_uint32_operations) Run<HUint32AnalysisPhase>();
2986 2988
2987 if (FLAG_use_canonicalizing) Run<HCanonicalizePhase>(); 2989 if (FLAG_use_canonicalizing) Run<HCanonicalizePhase>();
2988 2990
2989 if (FLAG_use_escape_analysis) Run<HEscapeAnalysisPhase>();
2990
2991 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>(); 2991 if (FLAG_use_gvn) Run<HGlobalValueNumberingPhase>();
2992 2992
2993 if (FLAG_use_range) Run<HRangeAnalysisPhase>(); 2993 if (FLAG_use_range) Run<HRangeAnalysisPhase>();
2994 2994
2995 Run<HComputeMinusZeroChecksPhase>(); 2995 Run<HComputeMinusZeroChecksPhase>();
2996 2996
2997 // Eliminate redundant stack checks on backwards branches. 2997 // Eliminate redundant stack checks on backwards branches.
2998 Run<HStackCheckEliminationPhase>(); 2998 Run<HStackCheckEliminationPhase>();
2999 2999
3000 if (FLAG_idefs) SetupInformativeDefinitions(); 3000 if (FLAG_idefs) SetupInformativeDefinitions();
(...skipping 6886 matching lines...) Expand 10 before | Expand all | Expand 10 after
9887 if (ShouldProduceTraceOutput()) { 9887 if (ShouldProduceTraceOutput()) {
9888 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9888 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9889 } 9889 }
9890 9890
9891 #ifdef DEBUG 9891 #ifdef DEBUG
9892 graph_->Verify(false); // No full verify. 9892 graph_->Verify(false); // No full verify.
9893 #endif 9893 #endif
9894 } 9894 }
9895 9895
9896 } } // namespace v8::internal 9896 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698