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

Side by Side Diff: src/IceGlobalInits.cpp

Issue 1206723003: Function Layout, Global Variable Layout and Pooled Constants Layout Reordering (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 5 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/IceGlobalInits.cpp - Global declarations ---------------===// 1 //===- subzero/src/IceGlobalInits.cpp - Global declarations ---------------===//
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 implements the notion of function declarations, global 10 // This file implements the notion of function declarations, global
11 // variable declarations, and the corresponding variable initializers 11 // variable declarations, and the corresponding variable initializers
12 // in Subzero. 12 // in Subzero.
13 // 13 //
14 //===----------------------------------------------------------------------===// 14 //===----------------------------------------------------------------------===//
15 15
16 #include "IceGlobalInits.h" 16 #include "IceGlobalInits.h"
17 17
18 #include "IceDefs.h" 18 #include "IceDefs.h"
19 #include "IceGlobalContext.h" 19 #include "IceGlobalContext.h"
20 #include "IceTypes.h" 20 #include "IceTypes.h"
21 #include "llvm/ADT/STLExtras.h" 21 #include "llvm/ADT/STLExtras.h"
22 #include "llvm/IR/Function.h" 22 #include "llvm/IR/Function.h"
23 #include "llvm/IR/Value.h" 23 #include "llvm/IR/Value.h"
24 24
25
26 namespace { 25 namespace {
27 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; } 26 char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; }
28 27
29 void dumpLinkage(Ice::Ostream &Stream, 28 void dumpLinkage(Ice::Ostream &Stream,
30 llvm::GlobalValue::LinkageTypes Linkage) { 29 llvm::GlobalValue::LinkageTypes Linkage) {
31 if (!Ice::BuildDefs::dump()) 30 if (!Ice::BuildDefs::dump())
32 return; 31 return;
33 switch (Linkage) { 32 switch (Linkage) {
34 case llvm::GlobalValue::ExternalLinkage: 33 case llvm::GlobalValue::ExternalLinkage:
35 Stream << "external"; 34 Stream << "external";
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 dumpType(Stream); 197 dumpType(Stream);
199 Stream << ")"; 198 Stream << ")";
200 if (Offset != 0) { 199 if (Offset != 0) {
201 Stream << ", "; 200 Stream << ", ";
202 dumpType(Stream); 201 dumpType(Stream);
203 Stream << " " << Offset << ")"; 202 Stream << " " << Offset << ")";
204 } 203 }
205 } 204 }
206 205
207 } // end of namespace Ice 206 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698