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

Side by Side Diff: src/IceDefs.h

Issue 883983002: Add -pedantic to Makefile.standalone to match production. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 | « Makefile.standalone ('k') | 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/IceDefs.h - Common Subzero declaraions -------*- C++ -*-===// 1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- 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 various useful types and classes that have 10 // This file declares various useful types and classes that have
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 typedef uint32_t TimerStackIdT; 123 typedef uint32_t TimerStackIdT;
124 typedef uint32_t TimerIdT; 124 typedef uint32_t TimerIdT;
125 125
126 // Use alignas(MaxCacheLineSize) to isolate variables/fields that 126 // Use alignas(MaxCacheLineSize) to isolate variables/fields that
127 // might be contended while multithreading. Assumes the maximum cache 127 // might be contended while multithreading. Assumes the maximum cache
128 // line size is 64. 128 // line size is 64.
129 enum { MaxCacheLineSize = 64 }; 129 enum { MaxCacheLineSize = 64 };
130 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration 130 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration
131 // list to be aligned to the next cache line. 131 // list to be aligned to the next cache line.
132 #define TOKENPASTE(x, y) x##y
133 #define TOKENPASTE2(x, y) TOKENPASTE(x, y)
132 #define ICE_CACHELINE_BOUNDARY \ 134 #define ICE_CACHELINE_BOUNDARY \
133 alignas(MaxCacheLineSize) struct {} 135 void TOKENPASTE2(FakeUsage, __LINE__)() { \
136 (void) TOKENPASTE2(Boundary, __LINE__); \
137 } \
138 alignas(MaxCacheLineSize) struct TOKENPASTE2(FakeType, __LINE__) { \
139 } TOKENPASTE2(Boundary, __LINE__)
JF 2015/01/28 01:28:45 You don't need the fake usage as long as you insta
Jim Stichnoth 2015/01/28 03:26:37 Done.
JF 2015/01/28 07:14:45 Richard makes a good point that you can wrap each
Jim Stichnoth 2015/01/28 15:39:18 Yeah, that is pretty nice and clear. Except is th
134 140
135 // PNaCl is ILP32, so theoretically we should only need 32-bit offsets. 141 // PNaCl is ILP32, so theoretically we should only need 32-bit offsets.
136 typedef int32_t RelocOffsetT; 142 typedef int32_t RelocOffsetT;
137 enum { RelocAddrSize = 4 }; 143 enum { RelocAddrSize = 4 };
138 144
139 enum LivenessMode { 145 enum LivenessMode {
140 // Basic version of live-range-end calculation. Marks the last uses 146 // Basic version of live-range-end calculation. Marks the last uses
141 // of variables based on dataflow analysis. Records the set of 147 // of variables based on dataflow analysis. Records the set of
142 // live-in and live-out variables for each block. Identifies and 148 // live-in and live-out variables for each block. Identifies and
143 // deletes dead instructions (primarily stores). 149 // deletes dead instructions (primarily stores).
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 return llvm::make_range(Container.rbegin(), Container.rend()); 214 return llvm::make_range(Container.rbegin(), Container.rend());
209 } 215 }
210 template <typename T> 216 template <typename T>
211 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { 217 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) {
212 return llvm::make_range(Container.rbegin(), Container.rend()); 218 return llvm::make_range(Container.rbegin(), Container.rend());
213 } 219 }
214 220
215 } // end of namespace Ice 221 } // end of namespace Ice
216 222
217 #endif // SUBZERO_SRC_ICEDEFS_H 223 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « Makefile.standalone ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698