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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 const VarList &getVariables() const { return Variables; } | 126 const VarList &getVariables() const { return Variables; } |
127 /// @} | 127 /// @} |
128 | 128 |
129 /// \name Manage arguments to the function. | 129 /// \name Manage arguments to the function. |
130 /// @{ | 130 /// @{ |
131 void addArg(Variable *Arg); | 131 void addArg(Variable *Arg); |
132 const VarList &getArgs() const { return Args; } | 132 const VarList &getArgs() const { return Args; } |
133 VarList &getArgs() { return Args; } | 133 VarList &getArgs() { return Args; } |
134 void addImplicitArg(Variable *Arg); | 134 void addImplicitArg(Variable *Arg); |
135 const VarList &getImplicitArgs() const { return ImplicitArgs; } | 135 const VarList &getImplicitArgs() const { return ImplicitArgs; } |
| 136 void setImplicitRet(Variable *Ret) { ImplicitRet = Ret; } |
| 137 Variable *getImplicitRet() const { return ImplicitRet; } |
136 /// @} | 138 /// @} |
137 | 139 |
138 /// \name Manage the jump tables. | 140 /// \name Manage the jump tables. |
139 /// @{ | 141 /// @{ |
140 void addJumpTable(InstJumpTable *JumpTable) { | 142 void addJumpTable(InstJumpTable *JumpTable) { |
141 JumpTables.emplace_back(JumpTable); | 143 JumpTables.emplace_back(JumpTable); |
142 } | 144 } |
143 /// @} | 145 /// @} |
144 | 146 |
145 /// \name Manage the Globals used by this function. | 147 /// \name Manage the Globals used by this function. |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 GlobalString FunctionName; | 320 GlobalString FunctionName; |
319 Type ReturnType = IceType_void; | 321 Type ReturnType = IceType_void; |
320 bool IsInternalLinkage = false; | 322 bool IsInternalLinkage = false; |
321 bool HasError = false; | 323 bool HasError = false; |
322 bool FocusedTiming = false; | 324 bool FocusedTiming = false; |
323 std::string ErrorMessage = ""; | 325 std::string ErrorMessage = ""; |
324 CfgNode *Entry = nullptr; /// entry basic block | 326 CfgNode *Entry = nullptr; /// entry basic block |
325 NodeList Nodes; /// linearized node list; Entry should be first | 327 NodeList Nodes; /// linearized node list; Entry should be first |
326 InstNumberT NextInstNumber; | 328 InstNumberT NextInstNumber; |
327 VarList Variables; | 329 VarList Variables; |
328 VarList Args; /// subset of Variables, in argument order | 330 VarList Args; /// subset of Variables, in argument order |
329 VarList ImplicitArgs; /// subset of Variables | 331 VarList ImplicitArgs; /// subset of Variables |
| 332 Variable *ImplicitRet; /// Implicit return |
330 // Separate string pools for CfgNode and Variable names, due to a combination | 333 // Separate string pools for CfgNode and Variable names, due to a combination |
331 // of the uniqueness requirement, and assumptions in lit tests. | 334 // of the uniqueness requirement, and assumptions in lit tests. |
332 std::unique_ptr<StringPool> NodeStrings; | 335 std::unique_ptr<StringPool> NodeStrings; |
333 std::unique_ptr<StringPool> VarStrings; | 336 std::unique_ptr<StringPool> VarStrings; |
334 std::unique_ptr<Liveness> Live; | 337 std::unique_ptr<Liveness> Live; |
335 std::unique_ptr<TargetLowering> Target; | 338 std::unique_ptr<TargetLowering> Target; |
336 std::unique_ptr<VariablesMetadata> VMetadata; | 339 std::unique_ptr<VariablesMetadata> VMetadata; |
337 std::unique_ptr<Assembler> TargetAssembler; | 340 std::unique_ptr<Assembler> TargetAssembler; |
338 /// Globals required by this CFG. Mostly used for the profiler's globals. | 341 /// Globals required by this CFG. Mostly used for the profiler's globals. |
339 std::unique_ptr<VariableDeclarationList> GlobalInits; | 342 std::unique_ptr<VariableDeclarationList> GlobalInits; |
(...skipping 23 matching lines...) Expand all Loading... |
363 using OwnerType = Cfg; | 366 using OwnerType = Cfg; |
364 static StringPool *getStrings(const OwnerType *PoolOwner) { | 367 static StringPool *getStrings(const OwnerType *PoolOwner) { |
365 return PoolOwner->getVarStrings(); | 368 return PoolOwner->getVarStrings(); |
366 } | 369 } |
367 }; | 370 }; |
368 using VariableString = StringID<VariableStringPoolTraits>; | 371 using VariableString = StringID<VariableStringPoolTraits>; |
369 | 372 |
370 } // end of namespace Ice | 373 } // end of namespace Ice |
371 | 374 |
372 #endif // SUBZERO_SRC_ICECFG_H | 375 #endif // SUBZERO_SRC_ICECFG_H |
OLD | NEW |