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

Side by Side Diff: src/IceDefs.h

Issue 874353006: Write out global initializers and data rel directly to ELF file. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: tweak comment Created 5 years, 10 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
OLDNEW
1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- C++ -*-===// 1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- 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 // This file declares various useful types and classes that have 10 // This file declares various useful types and classes that have
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class FunctionDeclaration; 53 class FunctionDeclaration;
54 class GlobalContext; 54 class GlobalContext;
55 class GlobalDeclaration; 55 class GlobalDeclaration;
56 class Inst; 56 class Inst;
57 class InstAssign; 57 class InstAssign;
58 class InstPhi; 58 class InstPhi;
59 class InstTarget; 59 class InstTarget;
60 class LiveRange; 60 class LiveRange;
61 class Liveness; 61 class Liveness;
62 class Operand; 62 class Operand;
63 class TargetGlobalLowering; 63 class TargetDataLowering;
64 class TargetLowering; 64 class TargetLowering;
65 class Variable; 65 class Variable;
66 class VariableDeclaration; 66 class VariableDeclaration;
67 class VariablesMetadata; 67 class VariablesMetadata;
68 68
69 template <size_t SlabSize = 1024 * 1024> 69 template <size_t SlabSize = 1024 * 1024>
70 using ArenaAllocator = 70 using ArenaAllocator =
71 llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, SlabSize>; 71 llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, SlabSize>;
72 72
73 ArenaAllocator<> *getCurrentCfgAllocator(); 73 ArenaAllocator<> *getCurrentCfgAllocator();
(...skipping 22 matching lines...) Expand all
96 typedef llvm::ilist<Inst> InstList; 96 typedef llvm::ilist<Inst> InstList;
97 // Ideally PhiList would be llvm::ilist<InstPhi>, and similar for 97 // Ideally PhiList would be llvm::ilist<InstPhi>, and similar for
98 // AssignList, but this runs into issues with SFINAE. 98 // AssignList, but this runs into issues with SFINAE.
99 typedef InstList PhiList; 99 typedef InstList PhiList;
100 typedef InstList AssignList; 100 typedef InstList AssignList;
101 // VarList and NodeList are arena-allocated from the Cfg's allocator. 101 // VarList and NodeList are arena-allocated from the Cfg's allocator.
102 typedef std::vector<Variable *, CfgLocalAllocator<Variable *>> VarList; 102 typedef std::vector<Variable *, CfgLocalAllocator<Variable *>> VarList;
103 typedef std::vector<CfgNode *, CfgLocalAllocator<CfgNode *>> NodeList; 103 typedef std::vector<CfgNode *, CfgLocalAllocator<CfgNode *>> NodeList;
104 typedef std::vector<Constant *> ConstantList; 104 typedef std::vector<Constant *> ConstantList;
105 105
106 typedef std::vector<VariableDeclaration *> VariableDeclarationList;
107
106 // SizeT is for holding small-ish limits like number of source 108 // SizeT is for holding small-ish limits like number of source
107 // operands in an instruction. It is used instead of size_t (which 109 // operands in an instruction. It is used instead of size_t (which
108 // may be 64-bits wide) when we want to save space. 110 // may be 64-bits wide) when we want to save space.
109 typedef uint32_t SizeT; 111 typedef uint32_t SizeT;
110 112
111 // InstNumberT is for holding an instruction number. Instruction 113 // InstNumberT is for holding an instruction number. Instruction
112 // numbers are used for representing Variable live ranges. 114 // numbers are used for representing Variable live ranges.
113 typedef int32_t InstNumberT; 115 typedef int32_t InstNumberT;
114 116
115 // A LiveBeginEndMapEntry maps a Variable::Number value to an 117 // A LiveBeginEndMapEntry maps a Variable::Number value to an
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return llvm::make_range(Container.rbegin(), Container.rend()); 212 return llvm::make_range(Container.rbegin(), Container.rend());
211 } 213 }
212 template <typename T> 214 template <typename T>
213 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { 215 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) {
214 return llvm::make_range(Container.rbegin(), Container.rend()); 216 return llvm::make_range(Container.rbegin(), Container.rend());
215 } 217 }
216 218
217 } // end of namespace Ice 219 } // end of namespace Ice
218 220
219 #endif // SUBZERO_SRC_ICEDEFS_H 221 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceELFObjectWriter.h » ('j') | src/IceELFObjectWriter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698