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

Side by Side Diff: runtime/vm/flow_graph_range_analysis.cc

Issue 2083103002: Remove some uses of STL map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/freelist.cc » ('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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_range_analysis.h" 5 #include "vm/flow_graph_range_analysis.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/il_printer.h" 8 #include "vm/il_printer.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 } 903 }
904 instruction->InputAt(i)->set_definition(scheduled); 904 instruction->InputAt(i)->set_definition(scheduled);
905 } else if (defn->IsConstraint()) { 905 } else if (defn->IsConstraint()) {
906 instruction->InputAt(i)->set_definition(UnwrapConstraint(defn)); 906 instruction->InputAt(i)->set_definition(UnwrapConstraint(defn));
907 } 907 }
908 } 908 }
909 909
910 // Attempt to find equivalent instruction that was already scheduled. 910 // Attempt to find equivalent instruction that was already scheduled.
911 // If the instruction is still in the graph (it could have been 911 // If the instruction is still in the graph (it could have been
912 // un-scheduled by a rollback action) and it dominates the sink - use it. 912 // un-scheduled by a rollback action) and it dominates the sink - use it.
913 Instruction* emitted = map_.Lookup(instruction); 913 Instruction* emitted = map_.LookupValue(instruction);
914 if (emitted != NULL && 914 if (emitted != NULL &&
915 !emitted->WasEliminated() && 915 !emitted->WasEliminated() &&
916 sink->IsDominatedBy(emitted)) { 916 sink->IsDominatedBy(emitted)) {
917 return emitted; 917 return emitted;
918 } 918 }
919 919
920 // Attempt to find suitable pre-header. Iterate loop headers backwards to 920 // Attempt to find suitable pre-header. Iterate loop headers backwards to
921 // attempt scheduling into the outermost loop first. 921 // attempt scheduling into the outermost loop first.
922 for (intptr_t i = loop_headers_.length() - 1; i >= 0; i--) { 922 for (intptr_t i = loop_headers_.length() - 1; i >= 0; i--) {
923 BlockEntryInstr* header = loop_headers_[i]; 923 BlockEntryInstr* header = loop_headers_[i];
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3159 } 3159 }
3160 } while (CanonicalizeMaxBoundary(&max) || 3160 } while (CanonicalizeMaxBoundary(&max) ||
3161 CanonicalizeMinBoundary(&canonical_length)); 3161 CanonicalizeMinBoundary(&canonical_length));
3162 3162
3163 // Failed to prove that maximum is bounded with array length. 3163 // Failed to prove that maximum is bounded with array length.
3164 return false; 3164 return false;
3165 } 3165 }
3166 3166
3167 3167
3168 } // namespace dart 3168 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/freelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698