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

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

Issue 596783002: Refactor bailout reasons and disable optimization in more cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove bogus assertion 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 | « BUILD.gn ('k') | 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 // 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_ARM_LITHIUM_ARM_H_ 5 #ifndef V8_ARM_LITHIUM_ARM_H_
6 #define V8_ARM_LITHIUM_ARM_H_ 6 #define V8_ARM_LITHIUM_ARM_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 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after
2751 : LChunk(info, graph) { } 2751 : LChunk(info, graph) { }
2752 2752
2753 int GetNextSpillIndex(RegisterKind kind); 2753 int GetNextSpillIndex(RegisterKind kind);
2754 LOperand* GetNextSpillSlot(RegisterKind kind); 2754 LOperand* GetNextSpillSlot(RegisterKind kind);
2755 }; 2755 };
2756 2756
2757 2757
2758 class LChunkBuilder FINAL : public LChunkBuilderBase { 2758 class LChunkBuilder FINAL : public LChunkBuilderBase {
2759 public: 2759 public:
2760 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2760 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2761 : LChunkBuilderBase(graph->zone()), 2761 : LChunkBuilderBase(info, graph),
2762 chunk_(NULL),
2763 info_(info),
2764 graph_(graph),
2765 status_(UNUSED),
2766 current_instruction_(NULL), 2762 current_instruction_(NULL),
2767 current_block_(NULL), 2763 current_block_(NULL),
2768 next_block_(NULL), 2764 next_block_(NULL),
2769 allocator_(allocator) { } 2765 allocator_(allocator) {}
2770
2771 Isolate* isolate() const { return graph_->isolate(); }
2772 2766
2773 // Build the sequence for the graph. 2767 // Build the sequence for the graph.
2774 LPlatformChunk* Build(); 2768 LPlatformChunk* Build();
2775 2769
2776 // Declare methods that deal with the individual node types. 2770 // Declare methods that deal with the individual node types.
2777 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2771 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2778 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2772 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2779 #undef DECLARE_DO 2773 #undef DECLARE_DO
2780 2774
2781 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); 2775 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend);
(...skipping 15 matching lines...) Expand all
2797 LInstruction* DoDivByConstI(HDiv* instr); 2791 LInstruction* DoDivByConstI(HDiv* instr);
2798 LInstruction* DoDivI(HDiv* instr); 2792 LInstruction* DoDivI(HDiv* instr);
2799 LInstruction* DoModByPowerOf2I(HMod* instr); 2793 LInstruction* DoModByPowerOf2I(HMod* instr);
2800 LInstruction* DoModByConstI(HMod* instr); 2794 LInstruction* DoModByConstI(HMod* instr);
2801 LInstruction* DoModI(HMod* instr); 2795 LInstruction* DoModI(HMod* instr);
2802 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr); 2796 LInstruction* DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr);
2803 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr); 2797 LInstruction* DoFlooringDivByConstI(HMathFloorOfDiv* instr);
2804 LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr); 2798 LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);
2805 2799
2806 private: 2800 private:
2807 enum Status {
2808 UNUSED,
2809 BUILDING,
2810 DONE,
2811 ABORTED
2812 };
2813
2814 LPlatformChunk* chunk() const { return chunk_; }
2815 CompilationInfo* info() const { return info_; }
2816 HGraph* graph() const { return graph_; }
2817
2818 bool is_unused() const { return status_ == UNUSED; }
2819 bool is_building() const { return status_ == BUILDING; }
2820 bool is_done() const { return status_ == DONE; }
2821 bool is_aborted() const { return status_ == ABORTED; }
2822
2823 void Abort(BailoutReason reason);
2824
2825 // Methods for getting operands for Use / Define / Temp. 2801 // Methods for getting operands for Use / Define / Temp.
2826 LUnallocated* ToUnallocated(Register reg); 2802 LUnallocated* ToUnallocated(Register reg);
2827 LUnallocated* ToUnallocated(DoubleRegister reg); 2803 LUnallocated* ToUnallocated(DoubleRegister reg);
2828 2804
2829 // Methods for setting up define-use relationships. 2805 // Methods for setting up define-use relationships.
2830 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand); 2806 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand);
2831 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register); 2807 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register);
2832 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value, 2808 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value,
2833 DoubleRegister fixed_register); 2809 DoubleRegister fixed_register);
2834 2810
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2899 void VisitInstruction(HInstruction* current); 2875 void VisitInstruction(HInstruction* current);
2900 void AddInstruction(LInstruction* instr, HInstruction* current); 2876 void AddInstruction(LInstruction* instr, HInstruction* current);
2901 2877
2902 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block); 2878 void DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block);
2903 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr); 2879 LInstruction* DoShift(Token::Value op, HBitwiseBinaryOperation* instr);
2904 LInstruction* DoArithmeticD(Token::Value op, 2880 LInstruction* DoArithmeticD(Token::Value op,
2905 HArithmeticBinaryOperation* instr); 2881 HArithmeticBinaryOperation* instr);
2906 LInstruction* DoArithmeticT(Token::Value op, 2882 LInstruction* DoArithmeticT(Token::Value op,
2907 HBinaryOperation* instr); 2883 HBinaryOperation* instr);
2908 2884
2909 LPlatformChunk* chunk_;
2910 CompilationInfo* info_;
2911 HGraph* const graph_;
2912 Status status_;
2913 HInstruction* current_instruction_; 2885 HInstruction* current_instruction_;
2914 HBasicBlock* current_block_; 2886 HBasicBlock* current_block_;
2915 HBasicBlock* next_block_; 2887 HBasicBlock* next_block_;
2916 LAllocator* allocator_; 2888 LAllocator* allocator_;
2917 2889
2918 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2890 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2919 }; 2891 };
2920 2892
2921 #undef DECLARE_HYDROGEN_ACCESSOR 2893 #undef DECLARE_HYDROGEN_ACCESSOR
2922 #undef DECLARE_CONCRETE_INSTRUCTION 2894 #undef DECLARE_CONCRETE_INSTRUCTION
2923 2895
2924 } } // namespace v8::internal 2896 } } // namespace v8::internal
2925 2897
2926 #endif // V8_ARM_LITHIUM_ARM_H_ 2898 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698