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

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

Issue 593313004: MIPS: Refactor bailout reasons and disable optimization in more cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « src/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_MIPS_LITHIUM_MIPS_H_ 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_
6 #define V8_MIPS_LITHIUM_MIPS_H_ 6 #define V8_MIPS_LITHIUM_MIPS_H_
7 7
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium.h" 9 #include "src/lithium.h"
10 #include "src/lithium-allocator.h" 10 #include "src/lithium-allocator.h"
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2695 : LChunk(info, graph) { } 2695 : LChunk(info, graph) { }
2696 2696
2697 int GetNextSpillIndex(RegisterKind kind); 2697 int GetNextSpillIndex(RegisterKind kind);
2698 LOperand* GetNextSpillSlot(RegisterKind kind); 2698 LOperand* GetNextSpillSlot(RegisterKind kind);
2699 }; 2699 };
2700 2700
2701 2701
2702 class LChunkBuilder FINAL : public LChunkBuilderBase { 2702 class LChunkBuilder FINAL : public LChunkBuilderBase {
2703 public: 2703 public:
2704 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2704 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2705 : LChunkBuilderBase(graph->zone()), 2705 : LChunkBuilderBase(info, graph),
2706 chunk_(NULL),
2707 info_(info),
2708 graph_(graph),
2709 status_(UNUSED),
2710 current_instruction_(NULL), 2706 current_instruction_(NULL),
2711 current_block_(NULL), 2707 current_block_(NULL),
2712 next_block_(NULL), 2708 next_block_(NULL),
2713 allocator_(allocator) { } 2709 allocator_(allocator) {}
2714
2715 Isolate* isolate() const { return graph_->isolate(); }
2716 2710
2717 // Build the sequence for the graph. 2711 // Build the sequence for the graph.
2718 LPlatformChunk* Build(); 2712 LPlatformChunk* Build();
2719 2713
2720 // Declare methods that deal with the individual node types. 2714 // Declare methods that deal with the individual node types.
2721 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2715 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2722 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2716 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2723 #undef DECLARE_DO 2717 #undef DECLARE_DO
2724 2718
2725 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); 2719 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend);
(...skipping 13 matching lines...) Expand all
2739 LInstruction* DoDivByConstI(HDiv* instr); 2733 LInstruction* DoDivByConstI(HDiv* instr);
2740 LInstruction* DoDivI(HDiv* instr); 2734 LInstruction* DoDivI(HDiv* instr);
2741 LInstruction* DoModByPowerOf2I(HMod* instr); 2735 LInstruction* DoModByPowerOf2I(HMod* instr);
2742 LInstruction* DoModByConstI(HMod* instr); 2736 LInstruction* DoModByConstI(HMod* instr);
2743 LInstruction* DoModI(HMod* instr); 2737 LInstruction* DoModI(HMod* instr);
2744 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); 2738 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr);
2745 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); 2739 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr);
2746 LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr); 2740 LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);
2747 2741
2748 private: 2742 private:
2749 enum Status {
2750 UNUSED,
2751 BUILDING,
2752 DONE,
2753 ABORTED
2754 };
2755
2756 LPlatformChunk* chunk() const { return chunk_; }
2757 CompilationInfo* info() const { return info_; }
2758 HGraph* graph() const { return graph_; }
2759
2760 bool is_unused() const { return status_ == UNUSED; }
2761 bool is_building() const { return status_ == BUILDING; }
2762 bool is_done() const { return status_ == DONE; }
2763 bool is_aborted() const { return status_ == ABORTED; }
2764
2765 void Abort(BailoutReason reason);
2766
2767 // Methods for getting operands for Use / Define / Temp. 2743 // Methods for getting operands for Use / Define / Temp.
2768 LUnallocated* ToUnallocated(Register reg); 2744 LUnallocated* ToUnallocated(Register reg);
2769 LUnallocated* ToUnallocated(DoubleRegister reg); 2745 LUnallocated* ToUnallocated(DoubleRegister reg);
2770 2746
2771 // Methods for setting up define-use relationships. 2747 // Methods for setting up define-use relationships.
2772 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand); 2748 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand);
2773 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register); 2749 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register);
2774 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value, 2750 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value,
2775 DoubleRegister fixed_register); 2751 DoubleRegister fixed_register);
2776 2752
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 void AddInstruction(LInstruction* instr, HInstruction* current); 2818 void AddInstruction(LInstruction* instr, HInstruction* current);
2843 2819
2844 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); 2820 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2845 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr); 2821 LInstruction* DoBit(Token::Value op, HBitwiseBinaryOperation* instr);
2846 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); 2822 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2847 LInstruction* DoArithmeticD(Token::Value op, 2823 LInstruction* DoArithmeticD(Token::Value op,
2848 HArithmeticBinaryOperation* instr); 2824 HArithmeticBinaryOperation* instr);
2849 LInstruction* DoArithmeticT(Token::Value op, 2825 LInstruction* DoArithmeticT(Token::Value op,
2850 HBinaryOperation* instr); 2826 HBinaryOperation* instr);
2851 2827
2852 LPlatformChunk* chunk_;
2853 CompilationInfo* info_;
2854 HGraph* const graph_;
2855 Status status_;
2856 HInstruction* current_instruction_; 2828 HInstruction* current_instruction_;
2857 HBasicBlock* current_block_; 2829 HBasicBlock* current_block_;
2858 HBasicBlock* next_block_; 2830 HBasicBlock* next_block_;
2859 LAllocator* allocator_; 2831 LAllocator* allocator_;
2860 2832
2861 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2833 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2862 }; 2834 };
2863 2835
2864 #undef DECLARE_HYDROGEN_ACCESSOR 2836 #undef DECLARE_HYDROGEN_ACCESSOR
2865 #undef DECLARE_CONCRETE_INSTRUCTION 2837 #undef DECLARE_CONCRETE_INSTRUCTION
2866 2838
2867 } } // namespace v8::internal 2839 } } // namespace v8::internal
2868 2840
2869 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2841 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698