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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 10916082: Make register allocator to disregard constant computation with no uses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/intermediate_language.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
11 #include "vm/handles_impl.h" 11 #include "vm/handles_impl.h"
12 #include "vm/locations.h" 12 #include "vm/locations.h"
13 #include "vm/object.h" 13 #include "vm/object.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 class BindInstr; 17 class BindInstr;
18 class BitVector; 18 class BitVector;
19 class BlockEntryInstr; 19 class BlockEntryInstr;
20 class BufferFormatter; 20 class BufferFormatter;
21 class ComparisonComp; 21 class ComparisonComp;
22 class ConstantComp;
22 class Computation; 23 class Computation;
23 class ControlInstruction; 24 class ControlInstruction;
24 class Definition; 25 class Definition;
25 class Environment; 26 class Environment;
26 class FlowGraphCompiler; 27 class FlowGraphCompiler;
27 class FlowGraphVisitor; 28 class FlowGraphVisitor;
28 class Instruction; 29 class Instruction;
29 class LocalVariable; 30 class LocalVariable;
30 31
31 32
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 // Precondition: use lists must be properly calculated. 857 // Precondition: use lists must be properly calculated.
857 // Postcondition: use lists and use values are still valid. 858 // Postcondition: use lists and use values are still valid.
858 void ReplaceUsesWith(Definition* other); 859 void ReplaceUsesWith(Definition* other);
859 860
860 // Insert this definition before 'next'. 861 // Insert this definition before 'next'.
861 void InsertBefore(Instruction* next); 862 void InsertBefore(Instruction* next);
862 863
863 // Insert this definition after 'prev'. 864 // Insert this definition after 'prev'.
864 void InsertAfter(Instruction* prev); 865 void InsertAfter(Instruction* prev);
865 866
867 // If this definition is a bind of a constant return it.
868 // Otherwise return NULL.
869 ConstantComp* AsConstant();
870
866 private: 871 private:
867 intptr_t temp_index_; 872 intptr_t temp_index_;
868 intptr_t ssa_temp_index_; 873 intptr_t ssa_temp_index_;
869 // TODO(regis): GrowableArray<const AbstractType*> propagated_types_; 874 // TODO(regis): GrowableArray<const AbstractType*> propagated_types_;
870 // For now: 875 // For now:
871 AbstractType& propagated_type_; 876 AbstractType& propagated_type_;
872 intptr_t propagated_cid_; 877 intptr_t propagated_cid_;
873 Value* input_use_list_; 878 Value* input_use_list_;
874 Value* env_use_list_; 879 Value* env_use_list_;
875 UseKind use_kind_; 880 UseKind use_kind_;
(...skipping 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after
3421 ForwardInstructionIterator* current_iterator_; 3426 ForwardInstructionIterator* current_iterator_;
3422 3427
3423 private: 3428 private:
3424 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3429 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3425 }; 3430 };
3426 3431
3427 3432
3428 } // namespace dart 3433 } // namespace dart
3429 3434
3430 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3435 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698