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

Side by Side Diff: src/hydrogen.h

Issue 7003087: Simplify the check when to perform loop invariant code motion. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 // If a target block is tagged as an inline function return, all 137 // If a target block is tagged as an inline function return, all
138 // predecessors should contain the inlined exit sequence: 138 // predecessors should contain the inlined exit sequence:
139 // 139 //
140 // LeaveInlined 140 // LeaveInlined
141 // Simulate (caller's environment) 141 // Simulate (caller's environment)
142 // Goto (target block) 142 // Goto (target block)
143 bool IsInlineReturnTarget() const { return is_inline_return_target_; } 143 bool IsInlineReturnTarget() const { return is_inline_return_target_; }
144 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; } 144 void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; }
145 145
146 bool IsDeoptimizing() const { return is_deoptimizing_; }
147 void MarkAsDeoptimizing() { is_deoptimizing_ = true; }
148
146 inline Zone* zone(); 149 inline Zone* zone();
147 150
148 #ifdef DEBUG 151 #ifdef DEBUG
149 void Verify(); 152 void Verify();
150 #endif 153 #endif
151 154
152 private: 155 private:
153 void RegisterPredecessor(HBasicBlock* pred); 156 void RegisterPredecessor(HBasicBlock* pred);
154 void AddDominatedBlock(HBasicBlock* block); 157 void AddDominatedBlock(HBasicBlock* block);
155 158
(...skipping 12 matching lines...) Expand all
168 ZoneList<HBasicBlock*> dominated_blocks_; 171 ZoneList<HBasicBlock*> dominated_blocks_;
169 HEnvironment* last_environment_; 172 HEnvironment* last_environment_;
170 // Outgoing parameter count at block exit, set during lithium translation. 173 // Outgoing parameter count at block exit, set during lithium translation.
171 int argument_count_; 174 int argument_count_;
172 // Instruction indices into the lithium code stream. 175 // Instruction indices into the lithium code stream.
173 int first_instruction_index_; 176 int first_instruction_index_;
174 int last_instruction_index_; 177 int last_instruction_index_;
175 ZoneList<int> deleted_phis_; 178 ZoneList<int> deleted_phis_;
176 HBasicBlock* parent_loop_header_; 179 HBasicBlock* parent_loop_header_;
177 bool is_inline_return_target_; 180 bool is_inline_return_target_;
181 bool is_deoptimizing_;
178 }; 182 };
179 183
180 184
181 class HLoopInformation: public ZoneObject { 185 class HLoopInformation: public ZoneObject {
182 public: 186 public:
183 explicit HLoopInformation(HBasicBlock* loop_header) 187 explicit HLoopInformation(HBasicBlock* loop_header)
184 : back_edges_(4), loop_header_(loop_header), blocks_(8) { 188 : back_edges_(4), loop_header_(loop_header), blocks_(8) {
185 blocks_.Add(loop_header); 189 blocks_.Add(loop_header);
186 } 190 }
187 virtual ~HLoopInformation() {} 191 virtual ~HLoopInformation() {}
(...skipping 30 matching lines...) Expand all
218 void InsertRepresentationChanges(); 222 void InsertRepresentationChanges();
219 void MarkDeoptimizeOnUndefined(); 223 void MarkDeoptimizeOnUndefined();
220 void ComputeMinusZeroChecks(); 224 void ComputeMinusZeroChecks();
221 bool ProcessArgumentsObject(); 225 bool ProcessArgumentsObject();
222 void EliminateRedundantPhis(); 226 void EliminateRedundantPhis();
223 void EliminateUnreachablePhis(); 227 void EliminateUnreachablePhis();
224 void Canonicalize(); 228 void Canonicalize();
225 void OrderBlocks(); 229 void OrderBlocks();
226 void AssignDominators(); 230 void AssignDominators();
227 void ReplaceCheckedValues(); 231 void ReplaceCheckedValues();
232 void MarkAsDeoptimizingRecursively(HBasicBlock* block);
228 233
229 // Returns false if there are phi-uses of the arguments-object 234 // Returns false if there are phi-uses of the arguments-object
230 // which are not supported by the optimizing compiler. 235 // which are not supported by the optimizing compiler.
231 bool CollectPhis(); 236 bool CollectPhis();
232 237
233 Handle<Code> Compile(CompilationInfo* info); 238 Handle<Code> Compile(CompilationInfo* info);
234 239
235 void set_undefined_constant(HConstant* constant) { 240 void set_undefined_constant(HConstant* constant) {
236 undefined_constant_.set(constant); 241 undefined_constant_.set(constant);
237 } 242 }
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 const char* filename_; 1198 const char* filename_;
1194 HeapStringAllocator string_allocator_; 1199 HeapStringAllocator string_allocator_;
1195 StringStream trace_; 1200 StringStream trace_;
1196 int indent_; 1201 int indent_;
1197 }; 1202 };
1198 1203
1199 1204
1200 } } // namespace v8::internal 1205 } } // namespace v8::internal
1201 1206
1202 #endif // V8_HYDROGEN_H_ 1207 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698