| OLD | NEW |
| 1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===// | 1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===// |
| 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 a driver for translating PNaCl bitcode into native code. | 10 // This file defines a driver for translating PNaCl bitcode into native code. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 {"disable_ir_gen", ALLOW_DISABLE_IR_GEN}, | 40 {"disable_ir_gen", ALLOW_DISABLE_IR_GEN}, |
| 41 {"llvm_cl", ALLOW_LLVM_CL}, | 41 {"llvm_cl", ALLOW_LLVM_CL}, |
| 42 {"llvm_ir", ALLOW_LLVM_IR}, | 42 {"llvm_ir", ALLOW_LLVM_IR}, |
| 43 {"llvm_ir_as_input", ALLOW_LLVM_IR_AS_INPUT}, | 43 {"llvm_ir_as_input", ALLOW_LLVM_IR_AS_INPUT}, |
| 44 {"minimal_build", ALLOW_MINIMAL_BUILD}, | 44 {"minimal_build", ALLOW_MINIMAL_BUILD}, |
| 45 {"browser_mode", PNACL_BROWSER_TRANSLATOR}}; | 45 {"browser_mode", PNACL_BROWSER_TRANSLATOR}}; |
| 46 | 46 |
| 47 // Validates values of build attributes. Prints them to Stream if | 47 // Validates values of build attributes. Prints them to Stream if |
| 48 // Stream is non-null. | 48 // Stream is non-null. |
| 49 void ValidateAndGenerateBuildAttributes(const ClFlags &Flags, Ostream *Stream) { | 49 void ValidateAndGenerateBuildAttributes(const ClFlags &Flags, Ostream *Stream) { |
| 50 // List the supported targets. |
| 50 if (Stream) { | 51 if (Stream) { |
| 51 // List the requested target. | |
| 52 *Stream << Flags.getTargetArch() << "\n"; | |
| 53 | |
| 54 // List the supported targets. | |
| 55 #define SUBZERO_TARGET(TARGET) *Stream << "target_" #TARGET << "\n"; | 52 #define SUBZERO_TARGET(TARGET) *Stream << "target_" #TARGET << "\n"; |
| 56 #include "llvm/Config/SZTargets.def" | 53 #include "llvm/Config/SZTargets.def" |
| 57 } | 54 } |
| 58 | 55 |
| 59 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes); | 56 for (size_t i = 0; i < llvm::array_lengthof(ConditionalBuildAttributes); |
| 60 ++i) { | 57 ++i) { |
| 61 switch (ConditionalBuildAttributes[i].FlagValue) { | 58 switch (ConditionalBuildAttributes[i].FlagValue) { |
| 62 case 0: | 59 case 0: |
| 63 if (Stream) | 60 if (Stream) |
| 64 *Stream << "no_" << ConditionalBuildAttributes[i].FlagName << "\n"; | 61 *Stream << "no_" << ConditionalBuildAttributes[i].FlagName << "\n"; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 Ctx.dumpTimers(); | 158 Ctx.dumpTimers(); |
| 162 if (Ctx.getFlags().getTimeEachFunction()) { | 159 if (Ctx.getFlags().getTimeEachFunction()) { |
| 163 const bool DumpCumulative = false; | 160 const bool DumpCumulative = false; |
| 164 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative); | 161 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative); |
| 165 } | 162 } |
| 166 const bool FinalStats = true; | 163 const bool FinalStats = true; |
| 167 Ctx.dumpStats("_FINAL_", FinalStats); | 164 Ctx.dumpStats("_FINAL_", FinalStats); |
| 168 } | 165 } |
| 169 | 166 |
| 170 } // end of namespace Ice | 167 } // end of namespace Ice |
| OLD | NEW |