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

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

Issue 1731743003: Move precompilation-related flags to flags list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make print_stop_message default false to fix build Created 4 years, 10 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/raw_object_snapshot.cc ('k') | runtime/vm/regexp.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/redundancy_elimination.h" 5 #include "vm/redundancy_elimination.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph.h" 8 #include "vm/flow_graph.h"
9 #include "vm/hash_map.h" 9 #include "vm/hash_map.h"
10 #include "vm/il_printer.h" 10 #include "vm/il_printer.h"
11 #include "vm/intermediate_language.h" 11 #include "vm/intermediate_language.h"
12 #include "vm/stack_frame.h" 12 #include "vm/stack_frame.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 16
17 DEFINE_FLAG(bool, dead_store_elimination, true, "Eliminate dead stores"); 17 DEFINE_FLAG(bool, dead_store_elimination, true, "Eliminate dead stores");
18 DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination."); 18 DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination.");
19 DEFINE_FLAG(bool, trace_load_optimization, false, 19 DEFINE_FLAG(bool, trace_load_optimization, false,
20 "Print live sets for load optimization pass."); 20 "Print live sets for load optimization pass.");
21 21
22 DECLARE_FLAG(bool, fields_may_be_reset);
23 DECLARE_FLAG(bool, precompilation);
24
25 // Quick access to the current zone. 22 // Quick access to the current zone.
26 #define Z (zone()) 23 #define Z (zone())
27 24
28 25
29 class CSEInstructionMap : public ValueObject { 26 class CSEInstructionMap : public ValueObject {
30 public: 27 public:
31 // Right now CSE and LICM track a single effect: possible externalization of 28 // Right now CSE and LICM track a single effect: possible externalization of
32 // strings. 29 // strings.
33 // Other effects like modifications of fields are tracked in a separate load 30 // Other effects like modifications of fields are tracked in a separate load
34 // forwarding pass via Alias structure. 31 // forwarding pass via Alias structure.
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 1420
1424 // Replace value we are checking with phi's input. 1421 // Replace value we are checking with phi's input.
1425 check->value()->BindTo(phi->InputAt(non_smi_input)->definition()); 1422 check->value()->BindTo(phi->InputAt(non_smi_input)->definition());
1426 1423
1427 phi->UpdateType(CompileType::FromCid(kSmiCid)); 1424 phi->UpdateType(CompileType::FromCid(kSmiCid));
1428 } 1425 }
1429 1426
1430 1427
1431 void LICM::OptimisticallySpecializeSmiPhis() { 1428 void LICM::OptimisticallySpecializeSmiPhis() {
1432 if (!flow_graph()->function().allows_hoisting_check_class() || 1429 if (!flow_graph()->function().allows_hoisting_check_class() ||
1433 FLAG_precompilation) { 1430 FLAG_precompiled_mode) {
1434 // Do not hoist any: Either deoptimized on a hoisted check, 1431 // Do not hoist any: Either deoptimized on a hoisted check,
1435 // or compiling precompiled code where we can't do optimistic 1432 // or compiling precompiled code where we can't do optimistic
1436 // hoisting of checks. 1433 // hoisting of checks.
1437 return; 1434 return;
1438 } 1435 }
1439 1436
1440 const ZoneGrowableArray<BlockEntryInstr*>& loop_headers = 1437 const ZoneGrowableArray<BlockEntryInstr*>& loop_headers =
1441 flow_graph()->LoopHeaders(); 1438 flow_graph()->LoopHeaders();
1442 1439
1443 for (intptr_t i = 0; i < loop_headers.length(); ++i) { 1440 for (intptr_t i = 0; i < loop_headers.length(); ++i) {
(...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after
3461 join->phis_ = NULL; 3458 join->phis_ = NULL;
3462 } else { 3459 } else {
3463 join->phis_->TruncateTo(to_index); 3460 join->phis_->TruncateTo(to_index);
3464 } 3461 }
3465 } 3462 }
3466 } 3463 }
3467 } 3464 }
3468 3465
3469 3466
3470 } // namespace dart 3467 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698