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

Side by Side Diff: src/IceIntrinsics.cpp

Issue 455633002: Subzero: Add the "llvm2ice -ffunction-sections" argument. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 6 years, 4 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/IceGlobalContext.cpp ('k') | src/IceTranslator.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/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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 SqrtInit(IceType_f32, "f32"), 172 SqrtInit(IceType_f32, "f32"),
173 SqrtInit(IceType_f64, "f64"), 173 SqrtInit(IceType_f64, "f64"),
174 #undef SqrtInit 174 #undef SqrtInit
175 { { { Intrinsics::Stacksave, true }, { IceType_i32 }, 1 }, "stacksave" }, 175 { { { Intrinsics::Stacksave, true }, { IceType_i32 }, 1 }, "stacksave" },
176 { { { Intrinsics::Stackrestore, true }, { IceType_void, IceType_i32 }, 2 }, 176 { { { Intrinsics::Stackrestore, true }, { IceType_void, IceType_i32 }, 2 },
177 "stackrestore" }, 177 "stackrestore" },
178 { { { Intrinsics::Trap, true }, { IceType_void }, 1 }, "trap" } 178 { { { Intrinsics::Trap, true }, { IceType_void }, 1 }, "trap" }
179 }; 179 };
180 const size_t IceIntrinsicsTableSize = llvm::array_lengthof(IceIntrinsicsTable); 180 const size_t IceIntrinsicsTableSize = llvm::array_lengthof(IceIntrinsicsTable);
181 181
182 } // end of namespace 182 } // end of anonymous namespace
183 183
184 Intrinsics::Intrinsics() { 184 Intrinsics::Intrinsics() {
185 for (size_t I = 0; I < IceIntrinsicsTableSize; ++I) { 185 for (size_t I = 0; I < IceIntrinsicsTableSize; ++I) {
186 const struct IceIntrinsicsEntry_ &Entry = IceIntrinsicsTable[I]; 186 const struct IceIntrinsicsEntry_ &Entry = IceIntrinsicsTable[I];
187 assert(Entry.Info.NumTypes <= kMaxIntrinsicParameters); 187 assert(Entry.Info.NumTypes <= kMaxIntrinsicParameters);
188 map.insert(std::make_pair(IceString(Entry.IntrinsicName), Entry.Info)); 188 map.insert(std::make_pair(IceString(Entry.IntrinsicName), Entry.Info));
189 } 189 }
190 } 190 }
191 191
192 Intrinsics::~Intrinsics() {} 192 Intrinsics::~Intrinsics() {}
193 193
194 const Intrinsics::FullIntrinsicInfo * 194 const Intrinsics::FullIntrinsicInfo *
195 Intrinsics::find(const IceString &Name) const { 195 Intrinsics::find(const IceString &Name) const {
196 IntrinsicMap::const_iterator it = map.find(Name); 196 IntrinsicMap::const_iterator it = map.find(Name);
197 if (it == map.end()) 197 if (it == map.end())
198 return NULL; 198 return NULL;
199 return &it->second; 199 return &it->second;
200 } 200 }
201 201
202 bool Intrinsics::VerifyMemoryOrder(uint64_t Order) { 202 bool Intrinsics::VerifyMemoryOrder(uint64_t Order) {
203 // There is only one memory ordering for atomics allowed right now. 203 // There is only one memory ordering for atomics allowed right now.
204 return Order == Intrinsics::MemoryOrderSequentiallyConsistent; 204 return Order == Intrinsics::MemoryOrderSequentiallyConsistent;
205 } 205 }
206 206
207 } // end of namespace Ice 207 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTranslator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698