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

Side by Side Diff: src/compiler/register-allocator.h

Issue 1518573002: RegisterAllocator: Clean up before adding aliasing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 7 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
« no previous file with comments | « no previous file | src/compiler/register-allocator.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_REGISTER_ALLOCATOR_H_ 5 #ifndef V8_REGISTER_ALLOCATOR_H_
6 #define V8_REGISTER_ALLOCATOR_H_ 6 #define V8_REGISTER_ALLOCATOR_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/ostreams.h" 9 #include "src/ostreams.h"
10 #include "src/register-configuration.h" 10 #include "src/register-configuration.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 kOperand, 239 kOperand,
240 kUsePos, 240 kUsePos,
241 kPhi, 241 kPhi,
242 kUnresolved 242 kUnresolved
243 }; 243 };
244 244
245 245
246 static const int32_t kUnassignedRegister = 246 static const int32_t kUnassignedRegister =
247 RegisterConfiguration::kMaxGeneralRegisters; 247 RegisterConfiguration::kMaxGeneralRegisters;
248 248
249 249 static_assert(kUnassignedRegister <= RegisterConfiguration::kMaxFPRegisters,
250 static_assert(kUnassignedRegister <= RegisterConfiguration::kMaxDoubleRegisters,
251 "kUnassignedRegister too small"); 250 "kUnassignedRegister too small");
252 251
253
254 // Representation of a use position. 252 // Representation of a use position.
255 class UsePosition final : public ZoneObject { 253 class UsePosition final : public ZoneObject {
256 public: 254 public:
257 UsePosition(LifetimePosition pos, InstructionOperand* operand, void* hint, 255 UsePosition(LifetimePosition pos, InstructionOperand* operand, void* hint,
258 UsePositionHintType hint_type); 256 UsePositionHintType hint_type);
259 257
260 InstructionOperand* operand() const { return operand_; } 258 InstructionOperand* operand() const { return operand_; }
261 bool HasOperand() const { return operand_ != nullptr; } 259 bool HasOperand() const { return operand_ != nullptr; }
262 260
263 bool RegisterIsBeneficial() const { 261 bool RegisterIsBeneficial() const {
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 850
853 private: 851 private:
854 int GetNextLiveRangeId(); 852 int GetNextLiveRangeId();
855 853
856 Zone* const allocation_zone_; 854 Zone* const allocation_zone_;
857 Frame* const frame_; 855 Frame* const frame_;
858 InstructionSequence* const code_; 856 InstructionSequence* const code_;
859 const char* const debug_name_; 857 const char* const debug_name_;
860 const RegisterConfiguration* const config_; 858 const RegisterConfiguration* const config_;
861 PhiMap phi_map_; 859 PhiMap phi_map_;
862 ZoneVector<int> allocatable_codes_;
863 ZoneVector<int> allocatable_double_codes_;
864 ZoneVector<BitVector*> live_in_sets_; 860 ZoneVector<BitVector*> live_in_sets_;
865 ZoneVector<BitVector*> live_out_sets_; 861 ZoneVector<BitVector*> live_out_sets_;
866 ZoneVector<TopLevelLiveRange*> live_ranges_; 862 ZoneVector<TopLevelLiveRange*> live_ranges_;
867 ZoneVector<TopLevelLiveRange*> fixed_live_ranges_; 863 ZoneVector<TopLevelLiveRange*> fixed_live_ranges_;
868 ZoneVector<TopLevelLiveRange*> fixed_double_live_ranges_; 864 ZoneVector<TopLevelLiveRange*> fixed_double_live_ranges_;
869 ZoneVector<SpillRange*> spill_ranges_; 865 ZoneVector<SpillRange*> spill_ranges_;
870 DelayedReferences delayed_references_; 866 DelayedReferences delayed_references_;
871 BitVector* assigned_registers_; 867 BitVector* assigned_registers_;
872 BitVector* assigned_double_registers_; 868 BitVector* assigned_double_registers_;
873 int virtual_register_count_; 869 int virtual_register_count_;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 RegisterAllocationData* const data_; 1193 RegisterAllocationData* const data_;
1198 1194
1199 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); 1195 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector);
1200 }; 1196 };
1201 1197
1202 } // namespace compiler 1198 } // namespace compiler
1203 } // namespace internal 1199 } // namespace internal
1204 } // namespace v8 1200 } // namespace v8
1205 1201
1206 #endif // V8_REGISTER_ALLOCATOR_H_ 1202 #endif // V8_REGISTER_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698