| 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. |
| 11 // It can either directly parse the binary bitcode file, or use LLVM routines to | 11 // It can either directly parse the binary bitcode file, or use LLVM routines to |
| 12 // parse a textual bitcode file into LLVM IR and then convert LLVM IR into ICE. | 12 // parse a textual bitcode file into LLVM IR and then convert LLVM IR into ICE. |
| 13 // In either case, the high-level ICE is then compiled down to native code, as | 13 // In either case, the high-level ICE is then compiled down to native code, as |
| 14 // either an ELF object file or a textual asm file. | 14 // either an ELF object file or a textual asm file. |
| 15 // | 15 // |
| 16 //===----------------------------------------------------------------------===// | 16 //===----------------------------------------------------------------------===// |
| 17 | 17 |
| 18 #include "IceCompiler.h" |
| 19 |
| 18 #include "llvm/ADT/STLExtras.h" | 20 #include "llvm/ADT/STLExtras.h" |
| 19 #include "llvm/IR/LLVMContext.h" | 21 #include "llvm/IR/LLVMContext.h" |
| 20 #include "llvm/IR/Module.h" | 22 #include "llvm/IR/Module.h" |
| 21 #include "llvm/IRReader/IRReader.h" | 23 #include "llvm/IRReader/IRReader.h" |
| 22 #include "llvm/Support/SourceMgr.h" | 24 #include "llvm/Support/SourceMgr.h" |
| 23 #include "llvm/Support/StreamingMemoryObject.h" | 25 #include "llvm/Support/StreamingMemoryObject.h" |
| 24 | 26 |
| 25 #include "IceCfg.h" | 27 #include "IceCfg.h" |
| 26 #include "IceClFlags.h" | 28 #include "IceClFlags.h" |
| 27 #include "IceClFlagsExtra.h" | 29 #include "IceClFlagsExtra.h" |
| 28 #include "IceCompiler.h" | |
| 29 #include "IceConverter.h" | 30 #include "IceConverter.h" |
| 30 #include "IceELFObjectWriter.h" | 31 #include "IceELFObjectWriter.h" |
| 31 #include "PNaClTranslator.h" | 32 #include "PNaClTranslator.h" |
| 32 namespace Ice { | 33 namespace Ice { |
| 33 | 34 |
| 34 namespace { | 35 namespace { |
| 35 | 36 |
| 36 struct { | 37 struct { |
| 37 const char *FlagName; | 38 const char *FlagName; |
| 38 int FlagValue; | 39 int FlagValue; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 161 |
| 161 if (Ctx.getFlags().getTimeEachFunction()) { | 162 if (Ctx.getFlags().getTimeEachFunction()) { |
| 162 const bool DumpCumulative = false; | 163 const bool DumpCumulative = false; |
| 163 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative); | 164 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative); |
| 164 } | 165 } |
| 165 constexpr bool FinalStats = true; | 166 constexpr bool FinalStats = true; |
| 166 Ctx.dumpStats("_FINAL_", FinalStats); | 167 Ctx.dumpStats("_FINAL_", FinalStats); |
| 167 } | 168 } |
| 168 | 169 |
| 169 } // end of namespace Ice | 170 } // end of namespace Ice |
| OLD | NEW |