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

Side by Side Diff: src/IceDefs.h

Issue 1838973005: Subzero. Liveness memory management. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 8 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 | « src/IceCfg.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- C++ -*-===// 1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include <string> 42 #include <string>
43 #include <system_error> 43 #include <system_error>
44 #include <unordered_map> 44 #include <unordered_map>
45 #include <unordered_set> 45 #include <unordered_set>
46 #include <utility> 46 #include <utility>
47 #include <vector> 47 #include <vector>
48 48
49 namespace Ice { 49 namespace Ice {
50 50
51 class Assembler; 51 class Assembler;
52 class BitVector; 52 template <template <typename> class> class BitVectorTmpl;
53 class Cfg; 53 class Cfg;
54 class CfgNode; 54 class CfgNode;
55 class Constant; 55 class Constant;
56 class ELFObjectWriter; 56 class ELFObjectWriter;
57 class ELFStreamer; 57 class ELFStreamer;
58 class FunctionDeclaration; 58 class FunctionDeclaration;
59 class GlobalContext; 59 class GlobalContext;
60 class GlobalDeclaration; 60 class GlobalDeclaration;
61 class Inst; 61 class Inst;
62 class InstAssign; 62 class InstAssign;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 std::vector<ArenaPtr> MergedArenas; 265 std::vector<ArenaPtr> MergedArenas;
266 }; 266 };
267 267
268 /// InstNumberT is for holding an instruction number. Instruction numbers are 268 /// InstNumberT is for holding an instruction number. Instruction numbers are
269 /// used for representing Variable live ranges. 269 /// used for representing Variable live ranges.
270 using InstNumberT = int32_t; 270 using InstNumberT = int32_t;
271 271
272 /// A LiveBeginEndMapEntry maps a Variable::Number value to an Inst::Number 272 /// A LiveBeginEndMapEntry maps a Variable::Number value to an Inst::Number
273 /// value, giving the instruction number that begins or ends a variable's live 273 /// value, giving the instruction number that begins or ends a variable's live
274 /// range. 274 /// range.
275 template <typename T>
276 using LivenessVector = std::vector<T, LivenessAllocator<T>>;
275 using LiveBeginEndMapEntry = std::pair<SizeT, InstNumberT>; 277 using LiveBeginEndMapEntry = std::pair<SizeT, InstNumberT>;
276 using LiveBeginEndMap = CfgVector<LiveBeginEndMapEntry>; 278 using LiveBeginEndMap = LivenessVector<LiveBeginEndMapEntry>;
277 using LivenessBV = BitVector; 279 using LivenessBV = BitVectorTmpl<LivenessAllocator>;
278 280
279 using TimerStackIdT = uint32_t; 281 using TimerStackIdT = uint32_t;
280 using TimerIdT = uint32_t; 282 using TimerIdT = uint32_t;
281 283
282 /// Use alignas(MaxCacheLineSize) to isolate variables/fields that might be 284 /// Use alignas(MaxCacheLineSize) to isolate variables/fields that might be
283 /// contended while multithreading. Assumes the maximum cache line size is 64. 285 /// contended while multithreading. Assumes the maximum cache line size is 64.
284 enum { MaxCacheLineSize = 64 }; 286 enum { MaxCacheLineSize = 64 };
285 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration 287 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration
286 // list to be aligned to the next cache line. 288 // list to be aligned to the next cache line.
287 // Note: zero is added to work around the following GCC 4.8 bug (fixed in 4.9): 289 // Note: zero is added to work around the following GCC 4.8 bug (fixed in 4.9):
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 RPE_PooledConstantReordering, 432 RPE_PooledConstantReordering,
431 RPE_RegAllocRandomization, 433 RPE_RegAllocRandomization,
432 RPE_num 434 RPE_num
433 }; 435 };
434 436
435 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>; 437 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>;
436 438
437 } // end of namespace Ice 439 } // end of namespace Ice
438 440
439 #endif // SUBZERO_SRC_ICEDEFS_H 441 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698