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

Side by Side Diff: src/IceIntrinsics.h

Issue 656123003: Subzero: Class definition cleanup. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes for Karl 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/IceInstX8632.h ('k') | src/IceLiveness.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.h - List of Ice Intrinsics -----*- C++ -*-===// 1 //===- subzero/src/IceIntrinsics.h - List of Ice Intrinsics -----*- 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 // This file declares the kinds of intrinsics supported by PNaCl. 10 // This file declares the kinds of intrinsics supported by PNaCl.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #ifndef SUBZERO_SRC_ICEINTRINSICS_H 14 #ifndef SUBZERO_SRC_ICEINTRINSICS_H
15 #define SUBZERO_SRC_ICEINTRINSICS_H 15 #define SUBZERO_SRC_ICEINTRINSICS_H
16 16
17 #include "IceDefs.h" 17 #include "IceDefs.h"
18 #include "IceTypes.h" 18 #include "IceTypes.h"
19 19
20 namespace Ice { 20 namespace Ice {
21 21
22 class InstCall; 22 class InstCall;
23 23
24 static const size_t kMaxIntrinsicParameters = 6; 24 static const size_t kMaxIntrinsicParameters = 6;
25 25
26 class Intrinsics { 26 class Intrinsics {
27 Intrinsics(const Intrinsics &) = delete;
28 Intrinsics &operator=(const Intrinsics &) = delete;
29
27 public: 30 public:
28 Intrinsics(); 31 Intrinsics();
29 ~Intrinsics(); 32 ~Intrinsics();
30 33
31 // Some intrinsics allow overloading by type. This enum collapses all 34 // Some intrinsics allow overloading by type. This enum collapses all
32 // overloads into a single ID, but the type can still be recovered by the 35 // overloads into a single ID, but the type can still be recovered by the
33 // type of the intrinsic function call's return value and parameters. 36 // type of the intrinsic function call's return value and parameters.
34 enum IntrinsicID { 37 enum IntrinsicID {
35 UnknownIntrinsic = 0, 38 UnknownIntrinsic = 0,
36 // Arbitrary (alphabetical) order. 39 // Arbitrary (alphabetical) order.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Find the information about a given intrinsic, based on function name. 154 // Find the information about a given intrinsic, based on function name.
152 // The function name is expected to have the common "llvm." prefix 155 // The function name is expected to have the common "llvm." prefix
153 // stripped. If found, returns a reference to a FullIntrinsicInfo entry 156 // stripped. If found, returns a reference to a FullIntrinsicInfo entry
154 // (valid for the lifetime of the map). Otherwise returns null. 157 // (valid for the lifetime of the map). Otherwise returns null.
155 const FullIntrinsicInfo *find(const IceString &Name) const; 158 const FullIntrinsicInfo *find(const IceString &Name) const;
156 159
157 private: 160 private:
158 // TODO(jvoung): May want to switch to something like LLVM's StringMap. 161 // TODO(jvoung): May want to switch to something like LLVM's StringMap.
159 typedef std::map<IceString, FullIntrinsicInfo> IntrinsicMap; 162 typedef std::map<IceString, FullIntrinsicInfo> IntrinsicMap;
160 IntrinsicMap Map; 163 IntrinsicMap Map;
161
162 Intrinsics(const Intrinsics &) = delete;
163 Intrinsics &operator=(const Intrinsics &) = delete;
164 }; 164 };
165 165
166 } // end of namespace Ice 166 } // end of namespace Ice
167 167
168 #endif // SUBZERO_SRC_ICEINTRINSICS_H 168 #endif // SUBZERO_SRC_ICEINTRINSICS_H
OLDNEW
« no previous file with comments | « src/IceInstX8632.h ('k') | src/IceLiveness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698