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

Side by Side Diff: src/IceIntrinsics.cpp

Issue 619893002: Subzero: Auto-awesome iterators. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use AsmCodeByte instead of uint8_t Created 6 years, 2 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/IceIntrinsics.h ('k') | src/IceOperand.cpp » ('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/IceIntrinsics.cpp - Functions related to intrinsics ----===// 1 //===- subzero/src/IceIntrinsics.cpp - Functions related to intrinsics ----===//
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 Intrinsics utilities for matching and 10 // This file implements the Intrinsics utilities for matching and
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const size_t IceIntrinsicsTableSize = llvm::array_lengthof(IceIntrinsicsTable); 200 const size_t IceIntrinsicsTableSize = llvm::array_lengthof(IceIntrinsicsTable);
201 201
202 #undef INTRIN 202 #undef INTRIN
203 203
204 } // end of anonymous namespace 204 } // end of anonymous namespace
205 205
206 Intrinsics::Intrinsics() { 206 Intrinsics::Intrinsics() {
207 for (size_t I = 0; I < IceIntrinsicsTableSize; ++I) { 207 for (size_t I = 0; I < IceIntrinsicsTableSize; ++I) {
208 const struct IceIntrinsicsEntry_ &Entry = IceIntrinsicsTable[I]; 208 const struct IceIntrinsicsEntry_ &Entry = IceIntrinsicsTable[I];
209 assert(Entry.Info.NumTypes <= kMaxIntrinsicParameters); 209 assert(Entry.Info.NumTypes <= kMaxIntrinsicParameters);
210 map.insert(std::make_pair(IceString(Entry.IntrinsicName), Entry.Info)); 210 Map.insert(std::make_pair(IceString(Entry.IntrinsicName), Entry.Info));
211 } 211 }
212 } 212 }
213 213
214 Intrinsics::~Intrinsics() {} 214 Intrinsics::~Intrinsics() {}
215 215
216 const Intrinsics::FullIntrinsicInfo * 216 const Intrinsics::FullIntrinsicInfo *
217 Intrinsics::find(const IceString &Name) const { 217 Intrinsics::find(const IceString &Name) const {
218 IntrinsicMap::const_iterator it = map.find(Name); 218 auto it = Map.find(Name);
219 if (it == map.end()) 219 if (it == Map.end())
220 return NULL; 220 return NULL;
221 return &it->second; 221 return &it->second;
222 } 222 }
223 223
224 bool Intrinsics::VerifyMemoryOrder(uint64_t Order) { 224 bool Intrinsics::VerifyMemoryOrder(uint64_t Order) {
225 // There is only one memory ordering for atomics allowed right now. 225 // There is only one memory ordering for atomics allowed right now.
226 return Order == Intrinsics::MemoryOrderSequentiallyConsistent; 226 return Order == Intrinsics::MemoryOrderSequentiallyConsistent;
227 } 227 }
228 228
229 Intrinsics::ValidateCallValue 229 Intrinsics::ValidateCallValue
(...skipping 19 matching lines...) Expand all
249 return Intrinsics::IsValidCall; 249 return Intrinsics::IsValidCall;
250 } 250 }
251 251
252 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const { 252 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const {
253 assert(NumTypes > 1); 253 assert(NumTypes > 1);
254 assert(Index + 1 < NumTypes); 254 assert(Index + 1 < NumTypes);
255 return Signature[Index + 1]; 255 return Signature[Index + 1];
256 } 256 }
257 257
258 } // end of namespace Ice 258 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceIntrinsics.h ('k') | src/IceOperand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698