OLD | NEW |
1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===// | 1 //===- subzero/src/main.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 that uses LLVM capabilities to parse a | 10 // This file defines a driver for translating PNaCl bitcode into native code. |
11 // bitcode file and build the LLVM IR, and then convert the LLVM basic | 11 // It can either directly parse the binary bitcode file, or use LLVM routines to |
12 // blocks, instructions, and operands into their Subzero equivalents. | 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 |
| 14 // either an ELF object file or a textual asm file. |
13 // | 15 // |
14 //===----------------------------------------------------------------------===// | 16 //===----------------------------------------------------------------------===// |
15 | 17 |
16 #include <fstream> | 18 #include <fstream> |
17 #include <iostream> | 19 #include <iostream> |
18 | 20 |
19 #include "llvm/ADT/STLExtras.h" | 21 #include "llvm/ADT/STLExtras.h" |
20 #include "llvm/IR/LLVMContext.h" | 22 #include "llvm/IR/LLVMContext.h" |
21 #include "llvm/IRReader/IRReader.h" | 23 #include "llvm/IRReader/IRReader.h" |
22 #include "llvm/Support/CommandLine.h" | 24 #include "llvm/Support/CommandLine.h" |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 if (SubzeroTimingEnabled) | 411 if (SubzeroTimingEnabled) |
410 Ctx.dumpTimers(); | 412 Ctx.dumpTimers(); |
411 if (TimeEachFunction) { | 413 if (TimeEachFunction) { |
412 const bool DumpCumulative = false; | 414 const bool DumpCumulative = false; |
413 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); | 415 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); |
414 } | 416 } |
415 const bool FinalStats = true; | 417 const bool FinalStats = true; |
416 Ctx.dumpStats("_FINAL_", FinalStats); | 418 Ctx.dumpStats("_FINAL_", FinalStats); |
417 return GetReturnValue(Ctx.getErrorStatus()->value()); | 419 return GetReturnValue(Ctx.getErrorStatus()->value()); |
418 } | 420 } |
OLD | NEW |