Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: src/IceCompiler.cpp

Issue 1202253002: Includes module header first. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes All Subzero includes to match LLVM style guide. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
20 #include "IceCfg.h"
21 #include "IceClFlags.h"
22 #include "IceClFlagsExtra.h"
23 #include "IceConverter.h"
24 #include "IceELFObjectWriter.h"
25 #include "PNaClTranslator.h"
18 #include "llvm/ADT/STLExtras.h" 26 #include "llvm/ADT/STLExtras.h"
19 #include "llvm/IR/LLVMContext.h" 27 #include "llvm/IR/LLVMContext.h"
20 #include "llvm/IR/Module.h" 28 #include "llvm/IR/Module.h"
21 #include "llvm/IRReader/IRReader.h" 29 #include "llvm/IRReader/IRReader.h"
22 #include "llvm/Support/SourceMgr.h" 30 #include "llvm/Support/SourceMgr.h"
23 #include "llvm/Support/StreamingMemoryObject.h" 31 #include "llvm/Support/StreamingMemoryObject.h"
24 32
25 #include "IceCfg.h"
26 #include "IceClFlags.h"
27 #include "IceClFlagsExtra.h"
28 #include "IceCompiler.h"
29 #include "IceConverter.h"
30 #include "IceELFObjectWriter.h"
31 #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;
39 } ConditionalBuildAttributes[] = {{"dump", ALLOW_DUMP}, 40 } ConditionalBuildAttributes[] = {{"dump", ALLOW_DUMP},
40 {"disable_ir_gen", ALLOW_DISABLE_IR_GEN}, 41 {"disable_ir_gen", ALLOW_DISABLE_IR_GEN},
41 {"llvm_cl", ALLOW_LLVM_CL}, 42 {"llvm_cl", ALLOW_LLVM_CL},
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698