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 /// \file | 10 /// \file |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 /// Translates the constructed ICE function Func to machine code. | 53 /// Translates the constructed ICE function Func to machine code. |
54 void translateFcn(std::unique_ptr<Cfg> Func); | 54 void translateFcn(std::unique_ptr<Cfg> Func); |
55 | 55 |
56 /// Lowers the given list of global addresses to target. Generates list of | 56 /// Lowers the given list of global addresses to target. Generates list of |
57 /// corresponding variable declarations. | 57 /// corresponding variable declarations. |
58 void | 58 void |
59 lowerGlobals(std::unique_ptr<VariableDeclarationList> VariableDeclarations); | 59 lowerGlobals(std::unique_ptr<VariableDeclarationList> VariableDeclarations); |
60 | 60 |
61 /// Creates a name using the given prefix and corresponding index. | 61 /// Creates a name using the given prefix and corresponding index. |
62 std::string createUnnamedName(const IceString &Prefix, SizeT Index); | 62 std::string createUnnamedName(const std::string &Prefix, SizeT Index); |
63 | 63 |
64 /// Reports if there is a (potential) conflict between Name, and using Prefix | 64 /// Reports if there is a (potential) conflict between Name, and using Prefix |
65 /// to name unnamed names. Errors are put on Ostream. Returns true if there | 65 /// to name unnamed names. Errors are put on Ostream. Returns true if there |
66 /// isn't a potential conflict. | 66 /// isn't a potential conflict. |
67 bool checkIfUnnamedNameSafe(const IceString &Name, const char *Kind, | 67 bool checkIfUnnamedNameSafe(const std::string &Name, const char *Kind, |
68 const IceString &Prefix); | 68 const std::string &Prefix); |
69 | 69 |
70 uint32_t getNextSequenceNumber() { return NextSequenceNumber++; } | 70 uint32_t getNextSequenceNumber() { return NextSequenceNumber++; } |
71 | 71 |
72 protected: | 72 protected: |
73 GlobalContext *Ctx; | 73 GlobalContext *Ctx; |
74 uint32_t NextSequenceNumber; | 74 uint32_t NextSequenceNumber; |
75 /// ErrorCode of the translation. | 75 /// ErrorCode of the translation. |
76 ErrorCode ErrorStatus; | 76 ErrorCode ErrorStatus; |
77 }; | 77 }; |
78 | 78 |
79 } // end of namespace Ice | 79 } // end of namespace Ice |
80 | 80 |
81 #endif // SUBZERO_SRC_ICETRANSLATOR_H | 81 #endif // SUBZERO_SRC_ICETRANSLATOR_H |
OLD | NEW |