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

Side by Side Diff: src/hydrogen.h

Issue 148153010: Synchronize with r15701. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/heap-snapshot-generator.cc ('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 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Simple accessors. 61 // Simple accessors.
62 int block_id() const { return block_id_; } 62 int block_id() const { return block_id_; }
63 void set_block_id(int id) { block_id_ = id; } 63 void set_block_id(int id) { block_id_ = id; }
64 HGraph* graph() const { return graph_; } 64 HGraph* graph() const { return graph_; }
65 Isolate* isolate() const; 65 Isolate* isolate() const;
66 const ZoneList<HPhi*>* phis() const { return &phis_; } 66 const ZoneList<HPhi*>* phis() const { return &phis_; }
67 HInstruction* first() const { return first_; } 67 HInstruction* first() const { return first_; }
68 HInstruction* last() const { return last_; } 68 HInstruction* last() const { return last_; }
69 void set_last(HInstruction* instr) { last_ = instr; } 69 void set_last(HInstruction* instr) { last_ = instr; }
70 HInstruction* GetLastInstruction();
71 HControlInstruction* end() const { return end_; } 70 HControlInstruction* end() const { return end_; }
72 HLoopInformation* loop_information() const { return loop_information_; } 71 HLoopInformation* loop_information() const { return loop_information_; }
73 const ZoneList<HBasicBlock*>* predecessors() const { return &predecessors_; } 72 const ZoneList<HBasicBlock*>* predecessors() const { return &predecessors_; }
74 bool HasPredecessor() const { return predecessors_.length() > 0; } 73 bool HasPredecessor() const { return predecessors_.length() > 0; }
75 const ZoneList<HBasicBlock*>* dominated_blocks() const { 74 const ZoneList<HBasicBlock*>* dominated_blocks() const {
76 return &dominated_blocks_; 75 return &dominated_blocks_;
77 } 76 }
78 const ZoneList<int>* deleted_phis() const { 77 const ZoneList<int>* deleted_phis() const {
79 return &deleted_phis_; 78 return &deleted_phis_;
80 } 79 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void Advance() { current_++; } 225 void Advance() { current_++; }
227 226
228 private: 227 private:
229 const ZoneList<HBasicBlock*>* predecessor_list_; 228 const ZoneList<HBasicBlock*>* predecessor_list_;
230 int current_; 229 int current_;
231 }; 230 };
232 231
233 232
234 class HInstructionIterator BASE_EMBEDDED { 233 class HInstructionIterator BASE_EMBEDDED {
235 public: 234 public:
236 explicit HInstructionIterator(HBasicBlock* block) : instr_(block->first()) { } 235 explicit HInstructionIterator(HBasicBlock* block)
236 : instr_(block->first()) {
237 next_ = Done() ? NULL : instr_->next();
238 }
237 239
238 bool Done() { return instr_ == NULL; } 240 inline bool Done() const { return instr_ == NULL; }
239 HInstruction* Current() { return instr_; } 241 inline HInstruction* Current() { return instr_; }
240 void Advance() { instr_ = instr_->next(); } 242 inline void Advance() {
243 instr_ = next_;
244 next_ = Done() ? NULL : instr_->next();
245 }
241 246
242 private: 247 private:
243 HInstruction* instr_; 248 HInstruction* instr_;
249 HInstruction* next_;
244 }; 250 };
245 251
246 252
247 class HLoopInformation: public ZoneObject { 253 class HLoopInformation: public ZoneObject {
248 public: 254 public:
249 HLoopInformation(HBasicBlock* loop_header, Zone* zone) 255 HLoopInformation(HBasicBlock* loop_header, Zone* zone)
250 : back_edges_(4, zone), 256 : back_edges_(4, zone),
251 loop_header_(loop_header), 257 loop_header_(loop_header),
252 blocks_(8, zone), 258 blocks_(8, zone),
253 stack_check_(NULL) { 259 stack_check_(NULL) {
(...skipping 30 matching lines...) Expand all
284 Isolate* isolate() const { return isolate_; } 290 Isolate* isolate() const { return isolate_; }
285 Zone* zone() const { return zone_; } 291 Zone* zone() const { return zone_; }
286 CompilationInfo* info() const { return info_; } 292 CompilationInfo* info() const { return info_; }
287 293
288 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } 294 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; }
289 const ZoneList<HPhi*>* phi_list() const { return phi_list_; } 295 const ZoneList<HPhi*>* phi_list() const { return phi_list_; }
290 HBasicBlock* entry_block() const { return entry_block_; } 296 HBasicBlock* entry_block() const { return entry_block_; }
291 HEnvironment* start_environment() const { return start_environment_; } 297 HEnvironment* start_environment() const { return start_environment_; }
292 298
293 void FinalizeUniqueValueIds(); 299 void FinalizeUniqueValueIds();
294 void InsertTypeConversions();
295 void MergeRemovableSimulates();
296 void MarkDeoptimizeOnUndefined(); 300 void MarkDeoptimizeOnUndefined();
297 void ComputeMinusZeroChecks();
298 bool ProcessArgumentsObject(); 301 bool ProcessArgumentsObject();
299 void Canonicalize();
300 void OrderBlocks(); 302 void OrderBlocks();
301 void AssignDominators(); 303 void AssignDominators();
302 void SetupInformativeDefinitions(); 304 void SetupInformativeDefinitions();
303 void DehoistSimpleArrayIndexComputations();
304 void RestoreActualValues(); 305 void RestoreActualValues();
305 void PropagateDeoptimizingMark();
306 void AnalyzeAndPruneEnvironmentLiveness();
307 306
308 // Returns false if there are phi-uses of the arguments-object 307 // Returns false if there are phi-uses of the arguments-object
309 // which are not supported by the optimizing compiler. 308 // which are not supported by the optimizing compiler.
310 bool CheckArgumentsPhiUses(); 309 bool CheckArgumentsPhiUses();
311 310
312 // Returns false if there are phi-uses of an uninitialized const 311 // Returns false if there are phi-uses of an uninitialized const
313 // which are not supported by the optimizing compiler. 312 // which are not supported by the optimizing compiler.
314 bool CheckConstPhiUses(); 313 bool CheckConstPhiUses();
315 314
316 void CollectPhis(); 315 void CollectPhis();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 private: 438 private:
440 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, 439 HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
441 int32_t integer_value); 440 int32_t integer_value);
442 441
443 template<class Phase> 442 template<class Phase>
444 void Run() { 443 void Run() {
445 Phase phase(this); 444 Phase phase(this);
446 phase.Run(); 445 phase.Run();
447 } 446 }
448 447
449 void MarkAsDeoptimizingRecursively(HBasicBlock* block);
450 void NullifyUnreachableInstructions();
451 void InsertTypeConversions(HInstruction* instr);
452 void PropagateMinusZeroChecks(HValue* value, BitVector* visited);
453 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); 448 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi);
454 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor); 449 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor);
455 void SetupInformativeDefinitionsInBlock(HBasicBlock* block); 450 void SetupInformativeDefinitionsInBlock(HBasicBlock* block);
456 void SetupInformativeDefinitionsRecursively(HBasicBlock* block); 451 void SetupInformativeDefinitionsRecursively(HBasicBlock* block);
457 452
458 Isolate* isolate_; 453 Isolate* isolate_;
459 int next_block_id_; 454 int next_block_id_;
460 HBasicBlock* entry_block_; 455 HBasicBlock* entry_block_;
461 HEnvironment* start_environment_; 456 HEnvironment* start_environment_;
462 ZoneList<HBasicBlock*> blocks_; 457 ZoneList<HBasicBlock*> blocks_;
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 HValue* result_value = NULL); 1835 HValue* result_value = NULL);
1841 1836
1842 HInstruction* BuildStoreNamedField(HValue* object, 1837 HInstruction* BuildStoreNamedField(HValue* object,
1843 Handle<String> name, 1838 Handle<String> name,
1844 HValue* value, 1839 HValue* value,
1845 Handle<Map> map, 1840 Handle<Map> map,
1846 LookupResult* lookup); 1841 LookupResult* lookup);
1847 HInstruction* BuildStoreNamedGeneric(HValue* object, 1842 HInstruction* BuildStoreNamedGeneric(HValue* object,
1848 Handle<String> name, 1843 Handle<String> name,
1849 HValue* value); 1844 HValue* value);
1850 HInstruction* BuildCallSetter(HValue* object,
1851 HValue* value,
1852 Handle<Map> map,
1853 Handle<JSFunction> setter,
1854 Handle<JSObject> holder);
1855 HInstruction* BuildStoreNamedMonomorphic(HValue* object, 1845 HInstruction* BuildStoreNamedMonomorphic(HValue* object,
1856 Handle<String> name, 1846 Handle<String> name,
1857 HValue* value, 1847 HValue* value,
1858 Handle<Map> map); 1848 Handle<Map> map);
1859 HInstruction* BuildStoreKeyedGeneric(HValue* object, 1849 HInstruction* BuildStoreKeyedGeneric(HValue* object,
1860 HValue* key, 1850 HValue* key,
1861 HValue* value); 1851 HValue* value);
1862 1852
1863 HValue* BuildContextChainWalk(Variable* var); 1853 HValue* BuildContextChainWalk(Variable* var);
1864 1854
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 EmbeddedVector<char, 64> filename_; 2090 EmbeddedVector<char, 64> filename_;
2101 HeapStringAllocator string_allocator_; 2091 HeapStringAllocator string_allocator_;
2102 StringStream trace_; 2092 StringStream trace_;
2103 int indent_; 2093 int indent_;
2104 }; 2094 };
2105 2095
2106 2096
2107 } } // namespace v8::internal 2097 } } // namespace v8::internal
2108 2098
2109 #endif // V8_HYDROGEN_H_ 2099 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698