| OLD | NEW |
| 1 //===- subzero/src/IceTranslator.cpp - ICE to machine code ------*- C++ -*-===// | 1 //===- subzero/src/IceTranslator.cpp - 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 defines the general driver class for translating ICE to | 10 // This file defines the general driver class for translating ICE to |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 OstreamLocker L(Ctx); | 47 OstreamLocker L(Ctx); |
| 48 Ostream &Stream = Ctx->getStrDump(); | 48 Ostream &Stream = Ctx->getStrDump(); |
| 49 Stream << "Warning : Default " << Kind << " prefix '" << Prefix | 49 Stream << "Warning : Default " << Kind << " prefix '" << Prefix |
| 50 << "' potentially conflicts with name '" << Name << "'.\n"; | 50 << "' potentially conflicts with name '" << Name << "'.\n"; |
| 51 return true; | 51 return true; |
| 52 } | 52 } |
| 53 return false; | 53 return false; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void Translator::translateFcn(Cfg *Func) { | 56 void Translator::translateFcn(std::unique_ptr<Cfg> Func) { |
| 57 Ctx->cfgQueueBlockingPush(Func); | 57 Ctx->cfgQueueBlockingPush(std::move(Func)); |
| 58 if (Ctx->getFlags().NumTranslationThreads == 0) { | 58 if (Ctx->getFlags().NumTranslationThreads == 0) { |
| 59 Ctx->translateFunctions(); | 59 Ctx->translateFunctions(); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 void Translator::emitConstants() { | 63 void Translator::emitConstants() { |
| 64 if (!getErrorStatus()) | 64 if (!getErrorStatus()) |
| 65 DataLowering->lowerConstants(Ctx); | 65 DataLowering->lowerConstants(Ctx); |
| 66 } | 66 } |
| 67 | 67 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 93 for (const Ice::VariableDeclaration *Global : VariableDeclarations) { | 93 for (const Ice::VariableDeclaration *Global : VariableDeclarations) { |
| 94 // Interleave dump output w/ emit output. | 94 // Interleave dump output w/ emit output. |
| 95 if (DumpGlobalVariables) | 95 if (DumpGlobalVariables) |
| 96 Global->dump(getContext(), Stream); | 96 Global->dump(getContext(), Stream); |
| 97 if (!DisableTranslation && | 97 if (!DisableTranslation && |
| 98 GlobalContext::matchSymbolName(Global->getName(), TranslateOnly)) | 98 GlobalContext::matchSymbolName(Global->getName(), TranslateOnly)) |
| 99 DataLowering->lowerGlobal(*Global); | 99 DataLowering->lowerGlobal(*Global); |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 } | 102 } |
| OLD | NEW |