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

Side by Side Diff: src/x64/lithium-x64.h

Issue 22876009: Improve and simplify removal of unreachable code (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing file Created 7 years, 2 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 396 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
397 return !IsRedundant(); 397 return !IsRedundant();
398 } 398 }
399 399
400 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 400 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
401 }; 401 };
402 402
403 403
404 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { 404 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
405 public: 405 public:
406 explicit LGoto(int block_id) : block_id_(block_id) { } 406 explicit LGoto(HBasicBlock* block) : block_(block) { }
407 407
408 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; 408 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
409 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 409 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
410 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 410 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
411 virtual bool IsControl() const V8_OVERRIDE { return true; } 411 virtual bool IsControl() const V8_OVERRIDE { return true; }
412 412
413 int block_id() const { return block_id_; } 413 int block_id() const { return block_->block_id(); }
414 414
415 private: 415 private:
416 int block_id_; 416 HBasicBlock* block_;
417 }; 417 };
418 418
419 419
420 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { 420 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
421 public: 421 public:
422 LLazyBailout() : gap_instructions_size_(0) { } 422 LLazyBailout() : gap_instructions_size_(0) { }
423 423
424 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 424 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
425 425
426 void set_gap_instructions_size(int gap_instructions_size) { 426 void set_gap_instructions_size(int gap_instructions_size) {
(...skipping 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 next_block_(NULL), 2560 next_block_(NULL),
2561 argument_count_(0), 2561 argument_count_(0),
2562 allocator_(allocator), 2562 allocator_(allocator),
2563 position_(RelocInfo::kNoPosition), 2563 position_(RelocInfo::kNoPosition),
2564 instruction_pending_deoptimization_environment_(NULL), 2564 instruction_pending_deoptimization_environment_(NULL),
2565 pending_deoptimization_ast_id_(BailoutId::None()) { } 2565 pending_deoptimization_ast_id_(BailoutId::None()) { }
2566 2566
2567 // Build the sequence for the graph. 2567 // Build the sequence for the graph.
2568 LPlatformChunk* Build(); 2568 LPlatformChunk* Build();
2569 2569
2570 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2571
2570 // Declare methods that deal with the individual node types. 2572 // Declare methods that deal with the individual node types.
2571 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2573 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2572 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2574 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2573 #undef DECLARE_DO 2575 #undef DECLARE_DO
2574 2576
2575 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); 2577 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val);
2576 2578
2577 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2579 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2578 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2580 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2579 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2581 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 2719
2718 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2720 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2719 }; 2721 };
2720 2722
2721 #undef DECLARE_HYDROGEN_ACCESSOR 2723 #undef DECLARE_HYDROGEN_ACCESSOR
2722 #undef DECLARE_CONCRETE_INSTRUCTION 2724 #undef DECLARE_CONCRETE_INSTRUCTION
2723 2725
2724 } } // namespace v8::int 2726 } } // namespace v8::int
2725 2727
2726 #endif // V8_X64_LITHIUM_X64_H_ 2728 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698