OLD | NEW |
---|---|
1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// | 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 const VarList &getImplicitArgs() const { return ImplicitArgs; } | 150 const VarList &getImplicitArgs() const { return ImplicitArgs; } |
151 /// @} | 151 /// @} |
152 | 152 |
153 /// \name Manage the jump tables. | 153 /// \name Manage the jump tables. |
154 /// @{ | 154 /// @{ |
155 void addJumpTable(InstJumpTable *JumpTable) { | 155 void addJumpTable(InstJumpTable *JumpTable) { |
156 JumpTables.emplace_back(JumpTable); | 156 JumpTables.emplace_back(JumpTable); |
157 } | 157 } |
158 /// @} | 158 /// @} |
159 | 159 |
160 /// \name Manages the Globals used by this CFG. | |
Jim Stichnoth
2016/02/10 06:35:59
s/Manages/Manage/ for consistency
Also, maybe s/C
John
2016/02/10 15:41:13
Done.
| |
161 /// @{ | |
162 std::unique_ptr<VariableDeclarationList> getGlobalInits() { | |
163 return std::move(GlobalInits); | |
164 } | |
165 void addGlobal(VariableDeclaration *Global) { | |
166 if (GlobalInits == nullptr) { | |
167 GlobalInits.reset(new VariableDeclarationList); | |
168 } | |
169 GlobalInits->push_back(Global); | |
170 } | |
171 /// @} | |
172 | |
160 /// \name Miscellaneous accessors. | 173 /// \name Miscellaneous accessors. |
161 /// @{ | 174 /// @{ |
162 TargetLowering *getTarget() const { return Target.get(); } | 175 TargetLowering *getTarget() const { return Target.get(); } |
163 VariablesMetadata *getVMetadata() const { return VMetadata.get(); } | 176 VariablesMetadata *getVMetadata() const { return VMetadata.get(); } |
164 Liveness *getLiveness() const { return Live.get(); } | 177 Liveness *getLiveness() const { return Live.get(); } |
165 template <typename T = Assembler> T *getAssembler() const { | 178 template <typename T = Assembler> T *getAssembler() const { |
166 return llvm::dyn_cast<T>(TargetAssembler.get()); | 179 return llvm::dyn_cast<T>(TargetAssembler.get()); |
167 } | 180 } |
168 Assembler *releaseAssembler() { return TargetAssembler.release(); } | 181 Assembler *releaseAssembler() { return TargetAssembler.release(); } |
169 std::unique_ptr<VariableDeclarationList> getGlobalInits() { | |
170 return std::move(GlobalInits); | |
171 } | |
172 bool hasComputedFrame() const; | 182 bool hasComputedFrame() const; |
173 bool getFocusedTiming() const { return FocusedTiming; } | 183 bool getFocusedTiming() const { return FocusedTiming; } |
174 void setFocusedTiming() { FocusedTiming = true; } | 184 void setFocusedTiming() { FocusedTiming = true; } |
175 uint32_t getConstantBlindingCookie() const { return ConstantBlindingCookie; } | 185 uint32_t getConstantBlindingCookie() const { return ConstantBlindingCookie; } |
176 /// @} | 186 /// @} |
177 | 187 |
178 /// Returns true if Var is a global variable that is used by the profiling | 188 /// Returns true if Var is a global variable that is used by the profiling |
179 /// code. | 189 /// code. |
180 static bool isProfileGlobal(const VariableDeclaration &Var); | 190 static bool isProfileGlobal(const VariableDeclaration &Var); |
181 | 191 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 | 320 |
311 public: | 321 public: |
312 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } | 322 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } |
313 }; | 323 }; |
314 | 324 |
315 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); | 325 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); |
316 | 326 |
317 } // end of namespace Ice | 327 } // end of namespace Ice |
318 | 328 |
319 #endif // SUBZERO_SRC_ICECFG_H | 329 #endif // SUBZERO_SRC_ICECFG_H |
OLD | NEW |