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

Side by Side Diff: src/IceDefs.h

Issue 574133002: Add initial integrated assembler w/ some Xmm ops. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: remove duplicate pxor, and use enum Created 6 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 | « src/IceClFlags.h ('k') | src/IceFixups.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/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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return End.getWallTime() - Start.getWallTime(); 123 return End.getWallTime() - Start.getWallTime();
124 } 124 }
125 void printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const; 125 void printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const;
126 126
127 private: 127 private:
128 const llvm::TimeRecord Start; 128 const llvm::TimeRecord Start;
129 Timer(const Timer &) LLVM_DELETED_FUNCTION; 129 Timer(const Timer &) LLVM_DELETED_FUNCTION;
130 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; 130 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION;
131 }; 131 };
132 132
133 template <typename T> bool WouldOverflowAdd(T X, T Y) {
134 return ((X > 0 && Y > 0 && (X > std::numeric_limits<T>::max() - Y)) ||
135 (X < 0 && Y < 0 && (X < std::numeric_limits<T>::min() - Y)));
136 }
137
138 } // end of namespace Ice 133 } // end of namespace Ice
139 134
140 #endif // SUBZERO_SRC_ICEDEFS_H 135 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « src/IceClFlags.h ('k') | src/IceFixups.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698