Chromium Code Reviews| 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 /// \file | 10 /// \file |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 namespace Ice { | 49 namespace Ice { |
| 50 | 50 |
| 51 namespace { | 51 namespace { |
| 52 | 52 |
| 53 bool llvmIRInput(const std::string &Filename) { | 53 bool llvmIRInput(const std::string &Filename) { |
| 54 return BuildDefs::llvmIrAsInput() && | 54 return BuildDefs::llvmIrAsInput() && |
| 55 std::regex_match(Filename, std::regex(".*\\.ll")); | 55 std::regex_match(Filename, std::regex(".*\\.ll")); |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool wasmInput(const std::string &Filename) { | 58 bool wasmInput(const std::string &Filename) { |
| 59 return BuildDefs::llvmIrAsInput() && | 59 return std::regex_match(Filename, std::regex(".*\\.wasm")); |
|
Jim Stichnoth
2016/04/26 22:36:43
Instead of removing BuildDefs::llvmIrAsInput(), ca
Eric Holk
2016/04/27 21:45:20
Done.
| |
| 60 std::regex_match(Filename, std::regex(".*\\.wasm")); | |
| 61 } | 60 } |
| 62 | 61 |
| 63 } // end of anonymous namespace | 62 } // end of anonymous namespace |
| 64 | 63 |
| 65 void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx, | 64 void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx, |
| 66 std::unique_ptr<llvm::DataStreamer> &&InputStream) { | 65 std::unique_ptr<llvm::DataStreamer> &&InputStream) { |
| 67 // The Minimal build (specifically, when dump()/emit() are not implemented) | 66 // The Minimal build (specifically, when dump()/emit() are not implemented) |
| 68 // allows only --filetype=obj. Check here to avoid cryptic error messages | 67 // allows only --filetype=obj. Check here to avoid cryptic error messages |
| 69 // downstream. | 68 // downstream. |
| 70 if (!BuildDefs::dump() && getFlags().getOutFileType() != FT_Elf) { | 69 if (!BuildDefs::dump() && getFlags().getOutFileType() != FT_Elf) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 Ctx.dumpTimers(); | 164 Ctx.dumpTimers(); |
| 166 | 165 |
| 167 if (getFlags().getTimeEachFunction()) { | 166 if (getFlags().getTimeEachFunction()) { |
| 168 constexpr bool NoDumpCumulative = false; | 167 constexpr bool NoDumpCumulative = false; |
| 169 Ctx.dumpTimers(GlobalContext::TSK_Funcs, NoDumpCumulative); | 168 Ctx.dumpTimers(GlobalContext::TSK_Funcs, NoDumpCumulative); |
| 170 } | 169 } |
| 171 Ctx.dumpStats(); | 170 Ctx.dumpStats(); |
| 172 } | 171 } |
| 173 | 172 |
| 174 } // end of namespace Ice | 173 } // end of namespace Ice |
| OLD | NEW |