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

Side by Side Diff: src/IceInst.h

Issue 2287363002: Subzero: Fix the LLVM trunk build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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.h - High-level instructions ----------*- C++ -*-===// 1 //===- subzero/src/IceInst.h - High-level instructions ----------*- C++ -*-===//
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 /// \file 10 /// \file
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 : Inst(Func, Kind, MaxSrcs, Dest) { 1115 : Inst(Func, Kind, MaxSrcs, Dest) {
1116 assert(Kind >= Target); 1116 assert(Kind >= Target);
1117 assert(Kind <= Target_Max); 1117 assert(Kind <= Target_Max);
1118 } 1118 }
1119 }; 1119 };
1120 1120
1121 bool checkForRedundantAssign(const Variable *Dest, const Operand *Source); 1121 bool checkForRedundantAssign(const Variable *Dest, const Operand *Source);
1122 1122
1123 } // end of namespace Ice 1123 } // end of namespace Ice
1124 1124
1125 #ifdef PNACL_LLVM
1125 namespace llvm { 1126 namespace llvm {
1126 1127
1127 /// Override the default ilist traits so that Inst's private ctor and deleted 1128 /// Override the default ilist traits so that Inst's private ctor and deleted
1128 /// dtor aren't invoked. 1129 /// dtor aren't invoked.
1129 template <> 1130 template <>
1130 struct ilist_traits<Ice::Inst> : public ilist_default_traits<Ice::Inst> { 1131 struct ilist_traits<Ice::Inst> : public ilist_default_traits<Ice::Inst> {
1131 Ice::Inst *createSentinel() const { 1132 Ice::Inst *createSentinel() const {
1132 return static_cast<Ice::Inst *>(&Sentinel); 1133 return static_cast<Ice::Inst *>(&Sentinel);
1133 } 1134 }
1134 static void destroySentinel(Ice::Inst *) {} 1135 static void destroySentinel(Ice::Inst *) {}
1135 Ice::Inst *provideInitialHead() const { return createSentinel(); } 1136 Ice::Inst *provideInitialHead() const { return createSentinel(); }
1136 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); } 1137 Ice::Inst *ensureHead(Ice::Inst *) const { return createSentinel(); }
1137 static void noteHead(Ice::Inst *, Ice::Inst *) {} 1138 static void noteHead(Ice::Inst *, Ice::Inst *) {}
1138 void deleteNode(Ice::Inst *) {} 1139 void deleteNode(Ice::Inst *) {}
1139 1140
1140 private: 1141 private:
1141 mutable ilist_half_node<Ice::Inst> Sentinel; 1142 mutable ilist_half_node<Ice::Inst> Sentinel;
1142 }; 1143 };
1143 1144
1144 } // end of namespace llvm 1145 } // end of namespace llvm
1146 #endif // PNACL_LLVM
1145 1147
1146 namespace Ice { 1148 namespace Ice {
1147 1149
1148 inline InstList::iterator instToIterator(Inst *Instr) { 1150 inline InstList::iterator instToIterator(Inst *Instr) {
1149 #ifdef PNACL_LLVM 1151 #ifdef PNACL_LLVM
1150 return Instr; 1152 return Instr;
1151 #else // !PNACL_LLVM 1153 #else // !PNACL_LLVM
1152 return Instr->getIterator(); 1154 return Instr->getIterator();
1153 #endif // !PNACL_LLVM 1155 #endif // !PNACL_LLVM
1154 } 1156 }
1155 1157
1156 inline Inst *iteratorToInst(InstList::iterator Iter) { return &*Iter; } 1158 inline Inst *iteratorToInst(InstList::iterator Iter) { return &*Iter; }
1157 1159
1158 inline const Inst *iteratorToInst(InstList::const_iterator Iter) { 1160 inline const Inst *iteratorToInst(InstList::const_iterator Iter) {
1159 return &*Iter; 1161 return &*Iter;
1160 } 1162 }
1161 1163
1162 } // end of namespace Ice 1164 } // end of namespace Ice
1163 1165
1164 #endif // SUBZERO_SRC_ICEINST_H 1166 #endif // SUBZERO_SRC_ICEINST_H
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698