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

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

Issue 22876009: Improve and simplify removal of unreachable code (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback 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
« no previous file with comments | « no previous file | src/arm/lithium-arm.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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 397 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
398 return !IsRedundant(); 398 return !IsRedundant();
399 } 399 }
400 400
401 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 401 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
402 }; 402 };
403 403
404 404
405 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { 405 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
406 public: 406 public:
407 explicit LGoto(int block_id) : block_id_(block_id) { } 407 explicit LGoto(HBasicBlock* block) : block_(block) { }
408 408
409 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; 409 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
410 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 410 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
411 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 411 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
412 virtual bool IsControl() const V8_OVERRIDE { return true; } 412 virtual bool IsControl() const V8_OVERRIDE { return true; }
413 413
414 int block_id() const { return block_id_; } 414 int block_id() const { return block_->block_id(); }
415 415
416 private: 416 private:
417 int block_id_; 417 HBasicBlock* block_;
418 }; 418 };
419 419
420 420
421 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { 421 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
422 public: 422 public:
423 LLazyBailout() : gap_instructions_size_(0) { } 423 LLazyBailout() : gap_instructions_size_(0) { }
424 424
425 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 425 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
426 426
427 void set_gap_instructions_size(int gap_instructions_size) { 427 void set_gap_instructions_size(int gap_instructions_size) {
(...skipping 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2751 next_block_(NULL), 2751 next_block_(NULL),
2752 argument_count_(0), 2752 argument_count_(0),
2753 allocator_(allocator), 2753 allocator_(allocator),
2754 position_(RelocInfo::kNoPosition), 2754 position_(RelocInfo::kNoPosition),
2755 instruction_pending_deoptimization_environment_(NULL), 2755 instruction_pending_deoptimization_environment_(NULL),
2756 pending_deoptimization_ast_id_(BailoutId::None()) { } 2756 pending_deoptimization_ast_id_(BailoutId::None()) { }
2757 2757
2758 // Build the sequence for the graph. 2758 // Build the sequence for the graph.
2759 LPlatformChunk* Build(); 2759 LPlatformChunk* Build();
2760 2760
2761 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2762
2761 // Declare methods that deal with the individual node types. 2763 // Declare methods that deal with the individual node types.
2762 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2764 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2763 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2765 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2764 #undef DECLARE_DO 2766 #undef DECLARE_DO
2765 2767
2766 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); 2768 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend);
2767 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul); 2769 LInstruction* DoMultiplySub(HValue* minuend, HMul* mul);
2768 LInstruction* DoRSub(HSub* instr); 2770 LInstruction* DoRSub(HSub* instr);
2769 2771
2770 static bool HasMagicNumberForDivisor(int32_t divisor); 2772 static bool HasMagicNumberForDivisor(int32_t divisor);
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 2911
2910 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2912 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2911 }; 2913 };
2912 2914
2913 #undef DECLARE_HYDROGEN_ACCESSOR 2915 #undef DECLARE_HYDROGEN_ACCESSOR
2914 #undef DECLARE_CONCRETE_INSTRUCTION 2916 #undef DECLARE_CONCRETE_INSTRUCTION
2915 2917
2916 } } // namespace v8::internal 2918 } } // namespace v8::internal
2917 2919
2918 #endif // V8_ARM_LITHIUM_ARM_H_ 2920 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698