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

Side by Side Diff: src/IceCfg.h

Issue 622443002: Subzero: Change llvm::OwningPtr to C++11's std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove ErrorOr for now Created 6 years, 2 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/IceCfg.cpp » ('j') | src/PNaClTranslator.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This file declares the Cfg class, which represents the control flow 10 // This file declares the Cfg class, which represents the control flow
11 // graph and the overall per-function compilation context. 11 // graph and the overall per-function compilation context.
12 // 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #ifndef SUBZERO_SRC_ICECFG_H 15 #ifndef SUBZERO_SRC_ICECFG_H
16 #define SUBZERO_SRC_ICECFG_H 16 #define SUBZERO_SRC_ICECFG_H
17 17
18 #include "IceDefs.h" 18 #include <memory>
19 #include "IceTypes.h" 19
20 #include "llvm/Support/Allocator.h"
20 21
21 #include "assembler.h" 22 #include "assembler.h"
22 #include "IceClFlags.h" 23 #include "IceClFlags.h"
24 #include "IceDefs.h"
23 #include "IceGlobalContext.h" 25 #include "IceGlobalContext.h"
24 26 #include "IceTypes.h"
25 #include "llvm/ADT/OwningPtr.h"
26 #include "llvm/Support/Allocator.h"
27 27
28 namespace Ice { 28 namespace Ice {
29 29
30 class Cfg { 30 class Cfg {
31 public: 31 public:
32 Cfg(GlobalContext *Ctx); 32 Cfg(GlobalContext *Ctx);
33 ~Cfg(); 33 ~Cfg();
34 34
35 GlobalContext *getContext() const { return Ctx; } 35 GlobalContext *getContext() const { return Ctx; }
36 36
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 Type ReturnType; 165 Type ReturnType;
166 bool IsInternalLinkage; 166 bool IsInternalLinkage;
167 bool HasError; 167 bool HasError;
168 IceString ErrorMessage; 168 IceString ErrorMessage;
169 CfgNode *Entry; // entry basic block 169 CfgNode *Entry; // entry basic block
170 NodeList Nodes; // linearized node list; Entry should be first 170 NodeList Nodes; // linearized node list; Entry should be first
171 InstNumberT NextInstNumber; 171 InstNumberT NextInstNumber;
172 VarList Variables; 172 VarList Variables;
173 VarList Args; // subset of Variables, in argument order 173 VarList Args; // subset of Variables, in argument order
174 VarList ImplicitArgs; // subset of Variables 174 VarList ImplicitArgs; // subset of Variables
175 llvm::OwningPtr<Liveness> Live; 175 std::unique_ptr<Liveness> Live;
176 llvm::OwningPtr<TargetLowering> Target; 176 std::unique_ptr<TargetLowering> Target;
177 llvm::OwningPtr<VariablesMetadata> VMetadata; 177 std::unique_ptr<VariablesMetadata> VMetadata;
178 llvm::OwningPtr<Assembler> TargetAssembler; 178 std::unique_ptr<Assembler> TargetAssembler;
179 179
180 // CurrentNode is maintained during dumping/emitting just for 180 // CurrentNode is maintained during dumping/emitting just for
181 // validating Variable::DefNode. Normally, a traversal over 181 // validating Variable::DefNode. Normally, a traversal over
182 // CfgNodes maintains this, but before global operations like 182 // CfgNodes maintains this, but before global operations like
183 // register allocation, resetCurrentNode() should be called to avoid 183 // register allocation, resetCurrentNode() should be called to avoid
184 // spurious validation failures. 184 // spurious validation failures.
185 const CfgNode *CurrentNode; 185 const CfgNode *CurrentNode;
186 186
187 Cfg(const Cfg &) LLVM_DELETED_FUNCTION; 187 Cfg(const Cfg &) LLVM_DELETED_FUNCTION;
188 Cfg &operator=(const Cfg &) LLVM_DELETED_FUNCTION; 188 Cfg &operator=(const Cfg &) LLVM_DELETED_FUNCTION;
189 }; 189 };
190 190
191 } // end of namespace Ice 191 } // end of namespace Ice
192 192
193 #endif // SUBZERO_SRC_ICECFG_H 193 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | src/PNaClTranslator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698