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

Side by Side Diff: src/IceTranslator.h

Issue 848193003: Subzero: Add locking to prepare for multithreaded translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 11 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/IceTranslator.h - ICE to machine code --------*- C++ -*-===// 1 //===- subzero/src/IceTranslator.h - ICE to machine code --------*- 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 general driver class for translating ICE to 10 // This file declares the general driver class for translating ICE to
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 /// list of corresponding variable declarations. 60 /// list of corresponding variable declarations.
61 void lowerGlobals(const VariableDeclarationListType &VariableDeclarations); 61 void lowerGlobals(const VariableDeclarationListType &VariableDeclarations);
62 62
63 /// Creates a name using the given prefix and corresponding index. 63 /// Creates a name using the given prefix and corresponding index.
64 std::string createUnnamedName(const IceString &Prefix, SizeT Index); 64 std::string createUnnamedName(const IceString &Prefix, SizeT Index);
65 65
66 /// Reports if there is a (potential) conflict between Name, and using 66 /// Reports if there is a (potential) conflict between Name, and using
67 /// Prefix to name unnamed names. Errors are put on Ostream. 67 /// Prefix to name unnamed names. Errors are put on Ostream.
68 /// Returns true if there isn't a potential conflict. 68 /// Returns true if there isn't a potential conflict.
69 bool checkIfUnnamedNameSafe(const IceString &Name, const char *Kind, 69 bool checkIfUnnamedNameSafe(const IceString &Name, const char *Kind,
70 const IceString &Prefix, Ostream &Stream); 70 const IceString &Prefix);
71 71
72 protected: 72 protected:
73 GlobalContext *Ctx; 73 GlobalContext *Ctx;
74 const ClFlags &Flags; 74 const ClFlags &Flags;
75 // The exit status of the translation. False is successful. True 75 // The exit status of the translation. False is successful. True
76 // otherwise. 76 // otherwise.
77 bool ErrorStatus; 77 bool ErrorStatus;
78 // Ideally, Func would be inside the methods that converts IR to 78 // Ideally, Func would be inside the methods that converts IR to
79 // functions. However, emitting the constant pool requires a valid 79 // functions. However, emitting the constant pool requires a valid
80 // Cfg object, so we need to defer deleting the last non-empty Cfg 80 // Cfg object, so we need to defer deleting the last non-empty Cfg
81 // object to emit the constant pool (via emitConstants). TODO: 81 // object to emit the constant pool (via emitConstants). TODO:
82 // Since all constants are globally pooled in the GlobalContext 82 // Since all constants are globally pooled in the GlobalContext
83 // object, change all Constant related functions to use 83 // object, change all Constant related functions to use
84 // GlobalContext instead of Cfg, and then make emitConstantPool use 84 // GlobalContext instead of Cfg, and then make emitConstantPool use
85 // that. 85 // that.
86 std::unique_ptr<Cfg> Func; 86 std::unique_ptr<Cfg> Func;
87 }; 87 };
88 88
89 } // end of namespace Ice 89 } // end of namespace Ice
90 90
91 #endif // SUBZERO_SRC_ICETRANSLATOR_H 91 #endif // SUBZERO_SRC_ICETRANSLATOR_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698