OLD | NEW |
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...) Loading... |
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 |
OLD | NEW |