OLD | NEW |
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 #ifndef VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ | 5 #ifndef VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ |
6 #define VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ | 6 #define VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ |
7 | 7 |
8 #include "vm/flow_graph.h" | 8 #include "vm/flow_graph.h" |
9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
10 | 10 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 void NarrowMintToInt32(); | 594 void NarrowMintToInt32(); |
595 | 595 |
596 void DiscoverSimpleInductionVariables(); | 596 void DiscoverSimpleInductionVariables(); |
597 | 597 |
598 // Remove artificial Constraint instructions and replace them with actual | 598 // Remove artificial Constraint instructions and replace them with actual |
599 // unconstrained definitions. | 599 // unconstrained definitions. |
600 void RemoveConstraints(); | 600 void RemoveConstraints(); |
601 | 601 |
602 Range* ConstraintSmiRange(Token::Kind op, Definition* boundary); | 602 Range* ConstraintSmiRange(Token::Kind op, Definition* boundary); |
603 | 603 |
604 Isolate* isolate() const { return flow_graph_->isolate(); } | 604 Zone* zone() const { return flow_graph_->zone(); } |
605 | 605 |
606 FlowGraph* flow_graph_; | 606 FlowGraph* flow_graph_; |
607 | 607 |
608 // Range object representing full Smi range. | 608 // Range object representing full Smi range. |
609 Range smi_range_; | 609 Range smi_range_; |
610 | 610 |
611 Range int64_range_; | 611 Range int64_range_; |
612 | 612 |
613 // Value that are known to be smi or mint. | 613 // Value that are known to be smi or mint. |
614 GrowableArray<Definition*> values_; | 614 GrowableArray<Definition*> values_; |
(...skipping 29 matching lines...) Expand all Loading... |
644 bool IsPotentialUint32Definition(Definition* def); | 644 bool IsPotentialUint32Definition(Definition* def); |
645 void FindPotentialUint32Definitions(); | 645 void FindPotentialUint32Definitions(); |
646 bool IsUint32NarrowingDefinition(Definition* def); | 646 bool IsUint32NarrowingDefinition(Definition* def); |
647 void FindUint32NarrowingDefinitions(); | 647 void FindUint32NarrowingDefinitions(); |
648 bool AllUsesAreUint32Narrowing(Value* list_head); | 648 bool AllUsesAreUint32Narrowing(Value* list_head); |
649 bool CanBecomeUint32(Definition* def); | 649 bool CanBecomeUint32(Definition* def); |
650 void Propagate(); | 650 void Propagate(); |
651 Definition* ConstructReplacementFor(Definition* def); | 651 Definition* ConstructReplacementFor(Definition* def); |
652 void ReplaceInstructions(); | 652 void ReplaceInstructions(); |
653 | 653 |
654 Isolate* isolate() const { return isolate_; } | 654 Zone* zone() const { return zone_; } |
655 | 655 |
656 GrowableArray<Definition*> potential_uint32_defs_; | 656 GrowableArray<Definition*> potential_uint32_defs_; |
657 BitVector* selected_uint32_defs_; | 657 BitVector* selected_uint32_defs_; |
658 | 658 |
659 FlowGraph* flow_graph_; | 659 FlowGraph* flow_graph_; |
660 Isolate* isolate_; | 660 Zone* zone_; |
661 }; | 661 }; |
662 | 662 |
663 | 663 |
664 } // namespace dart | 664 } // namespace dart |
665 | 665 |
666 #endif // VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ | 666 #endif // VM_FLOW_GRAPH_RANGE_ANALYSIS_H_ |
OLD | NEW |