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

Side by Side Diff: src/IceInst.cpp

Issue 877003003: Subzero: Use a "known" version of clang-format. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a clang-format blacklist. Fix formatting "errors". Created 5 years, 10 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
« no previous file with comments | « src/IceGlobalInits.cpp ('k') | src/IceInstX8632.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInst.cpp - High-level instruction implementation ----===// 1 //===- subzero/src/IceInst.cpp - High-level instruction implementation ----===//
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 Inst class, primarily the various 10 // This file implements the Inst class, primarily the various
(...skipping 12 matching lines...) Expand all
23 namespace { 23 namespace {
24 24
25 // Using non-anonymous struct so that array_lengthof works. 25 // Using non-anonymous struct so that array_lengthof works.
26 const struct InstArithmeticAttributes_ { 26 const struct InstArithmeticAttributes_ {
27 const char *DisplayString; 27 const char *DisplayString;
28 bool IsCommutative; 28 bool IsCommutative;
29 } InstArithmeticAttributes[] = { 29 } InstArithmeticAttributes[] = {
30 #define X(tag, str, commutative) \ 30 #define X(tag, str, commutative) \
31 { str, commutative } \ 31 { str, commutative } \
32 , 32 ,
33 ICEINSTARITHMETIC_TABLE 33 ICEINSTARITHMETIC_TABLE
34 #undef X 34 #undef X
35 }; 35 };
36 36
37 // Using non-anonymous struct so that array_lengthof works. 37 // Using non-anonymous struct so that array_lengthof works.
38 const struct InstCastAttributes_ { 38 const struct InstCastAttributes_ {
39 const char *DisplayString; 39 const char *DisplayString;
40 } InstCastAttributes[] = { 40 } InstCastAttributes[] = {
41 #define X(tag, str) \ 41 #define X(tag, str) \
42 { str } \ 42 { str } \
43 , 43 ,
44 ICEINSTCAST_TABLE 44 ICEINSTCAST_TABLE
45 #undef X 45 #undef X
46 }; 46 };
47 47
48 // Using non-anonymous struct so that array_lengthof works. 48 // Using non-anonymous struct so that array_lengthof works.
49 const struct InstFcmpAttributes_ { 49 const struct InstFcmpAttributes_ {
50 const char *DisplayString; 50 const char *DisplayString;
51 } InstFcmpAttributes[] = { 51 } InstFcmpAttributes[] = {
52 #define X(tag, str) \ 52 #define X(tag, str) \
53 { str } \ 53 { str } \
54 , 54 ,
55 ICEINSTFCMP_TABLE 55 ICEINSTFCMP_TABLE
56 #undef X 56 #undef X
57 }; 57 };
58 58
59 // Using non-anonymous struct so that array_lengthof works. 59 // Using non-anonymous struct so that array_lengthof works.
60 const struct InstIcmpAttributes_ { 60 const struct InstIcmpAttributes_ {
61 const char *DisplayString; 61 const char *DisplayString;
62 } InstIcmpAttributes[] = { 62 } InstIcmpAttributes[] = {
63 #define X(tag, str) \ 63 #define X(tag, str) \
64 { str } \ 64 { str } \
65 , 65 ,
66 ICEINSTICMP_TABLE 66 ICEINSTICMP_TABLE
67 #undef X 67 #undef X
68 }; 68 };
69 69
70 } // end of anonymous namespace 70 } // end of anonymous namespace
71 71
72 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) 72 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest)
73 : Kind(Kind), Number(Func->newInstNumber()), Deleted(false), Dead(false), 73 : Kind(Kind), Number(Func->newInstNumber()), Deleted(false), Dead(false),
74 HasSideEffects(false), IsDestNonKillable(false), Dest(Dest), 74 HasSideEffects(false), IsDestNonKillable(false), Dest(Dest),
75 MaxSrcs(MaxSrcs), NumSrcs(0), 75 MaxSrcs(MaxSrcs), NumSrcs(0),
76 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {} 76 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {}
77 77
78 // Assign the instruction a new number. 78 // Assign the instruction a new number.
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 818
819 void InstTarget::dump(const Cfg *Func) const { 819 void InstTarget::dump(const Cfg *Func) const {
820 if (!ALLOW_DUMP) 820 if (!ALLOW_DUMP)
821 return; 821 return;
822 Ostream &Str = Func->getContext()->getStrDump(); 822 Ostream &Str = Func->getContext()->getStrDump();
823 Str << "[TARGET] "; 823 Str << "[TARGET] ";
824 Inst::dump(Func); 824 Inst::dump(Func);
825 } 825 }
826 826
827 } // end of namespace Ice 827 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalInits.cpp ('k') | src/IceInstX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698