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

Side by Side Diff: src/hydrogen.h

Issue 10032029: Eliminate redundant array bound checks (checks already performed earlier in the DT). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More small style fixes. Created 8 years, 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 private: 234 private:
235 void AddBlock(HBasicBlock* block); 235 void AddBlock(HBasicBlock* block);
236 236
237 ZoneList<HBasicBlock*> back_edges_; 237 ZoneList<HBasicBlock*> back_edges_;
238 HBasicBlock* loop_header_; 238 HBasicBlock* loop_header_;
239 ZoneList<HBasicBlock*> blocks_; 239 ZoneList<HBasicBlock*> blocks_;
240 HStackCheck* stack_check_; 240 HStackCheck* stack_check_;
241 }; 241 };
242 242
243 243 class BoundsCheckTable;
244 class HGraph: public ZoneObject { 244 class HGraph: public ZoneObject {
245 public: 245 public:
246 explicit HGraph(CompilationInfo* info); 246 explicit HGraph(CompilationInfo* info);
247 247
248 Isolate* isolate() { return isolate_; } 248 Isolate* isolate() { return isolate_; }
249 Zone* zone() { return isolate_->zone(); } 249 Zone* zone() { return isolate_->zone(); }
250 250
251 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } 251 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; }
252 const ZoneList<HPhi*>* phi_list() const { return phi_list_; } 252 const ZoneList<HPhi*>* phi_list() const { return phi_list_; }
253 HBasicBlock* entry_block() const { return entry_block_; } 253 HBasicBlock* entry_block() const { return entry_block_; }
254 HEnvironment* start_environment() const { return start_environment_; } 254 HEnvironment* start_environment() const { return start_environment_; }
255 255
256 void InitializeInferredTypes(); 256 void InitializeInferredTypes();
257 void InsertTypeConversions(); 257 void InsertTypeConversions();
258 void InsertRepresentationChanges(); 258 void InsertRepresentationChanges();
259 void MarkDeoptimizeOnUndefined(); 259 void MarkDeoptimizeOnUndefined();
260 void ComputeMinusZeroChecks(); 260 void ComputeMinusZeroChecks();
261 bool ProcessArgumentsObject(); 261 bool ProcessArgumentsObject();
262 void EliminateRedundantPhis(); 262 void EliminateRedundantPhis();
263 void EliminateUnreachablePhis(); 263 void EliminateUnreachablePhis();
264 void Canonicalize(); 264 void Canonicalize();
265 void OrderBlocks(); 265 void OrderBlocks();
266 void AssignDominators(); 266 void AssignDominators();
267 void ReplaceCheckedValues(); 267 void ReplaceCheckedValues();
268 void EliminateRedundantBoundsChecks();
268 void PropagateDeoptimizingMark(); 269 void PropagateDeoptimizingMark();
269 270
270 // Returns false if there are phi-uses of the arguments-object 271 // Returns false if there are phi-uses of the arguments-object
271 // which are not supported by the optimizing compiler. 272 // which are not supported by the optimizing compiler.
272 bool CheckArgumentsPhiUses(); 273 bool CheckArgumentsPhiUses();
273 274
274 // Returns false if there are phi-uses of an uninitialized const 275 // Returns false if there are phi-uses of an uninitialized const
275 // which are not supported by the optimizing compiler. 276 // which are not supported by the optimizing compiler.
276 bool CheckConstPhiUses(); 277 bool CheckConstPhiUses();
277 278
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 void PropagateMinusZeroChecks(HValue* value, BitVector* visited); 351 void PropagateMinusZeroChecks(HValue* value, BitVector* visited);
351 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); 352 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi);
352 void InsertRepresentationChangeForUse(HValue* value, 353 void InsertRepresentationChangeForUse(HValue* value,
353 HValue* use_value, 354 HValue* use_value,
354 int use_index, 355 int use_index,
355 Representation to); 356 Representation to);
356 void InsertRepresentationChangesForValue(HValue* value); 357 void InsertRepresentationChangesForValue(HValue* value);
357 void InferTypes(ZoneList<HValue*>* worklist); 358 void InferTypes(ZoneList<HValue*>* worklist);
358 void InitializeInferredTypes(int from_inclusive, int to_inclusive); 359 void InitializeInferredTypes(int from_inclusive, int to_inclusive);
359 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor); 360 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor);
361 void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table);
360 362
361 Isolate* isolate_; 363 Isolate* isolate_;
362 int next_block_id_; 364 int next_block_id_;
363 HBasicBlock* entry_block_; 365 HBasicBlock* entry_block_;
364 HEnvironment* start_environment_; 366 HEnvironment* start_environment_;
365 ZoneList<HBasicBlock*> blocks_; 367 ZoneList<HBasicBlock*> blocks_;
366 ZoneList<HValue*> values_; 368 ZoneList<HValue*> values_;
367 ZoneList<HPhi*>* phi_list_; 369 ZoneList<HPhi*>* phi_list_;
368 SetOncePointer<HConstant> undefined_constant_; 370 SetOncePointer<HConstant> undefined_constant_;
369 SetOncePointer<HConstant> constant_1_; 371 SetOncePointer<HConstant> constant_1_;
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 const char* filename_; 1376 const char* filename_;
1375 HeapStringAllocator string_allocator_; 1377 HeapStringAllocator string_allocator_;
1376 StringStream trace_; 1378 StringStream trace_;
1377 int indent_; 1379 int indent_;
1378 }; 1380 };
1379 1381
1380 1382
1381 } } // namespace v8::internal 1383 } } // namespace v8::internal
1382 1384
1383 #endif // V8_HYDROGEN_H_ 1385 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698