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

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: more cleanup 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
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 return End.getWallTime() - Start.getWallTime(); 122 return End.getWallTime() - Start.getWallTime();
123 } 123 }
124 void printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const; 124 void printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const;
125 125
126 private: 126 private:
127 const llvm::TimeRecord Start; 127 const llvm::TimeRecord Start;
128 Timer(const Timer &) LLVM_DELETED_FUNCTION; 128 Timer(const Timer &) LLVM_DELETED_FUNCTION;
129 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; 129 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION;
130 }; 130 };
131 131
132 template <typename T> bool WouldOverflowAdd(T X, T Y) {
133 return ((X > 0 && Y > 0 && (X > std::numeric_limits<T>::max() - Y)) ||
134 (X < 0 && Y < 0 && (X < std::numeric_limits<T>::min() - Y)));
135 }
136
137 } // end of namespace Ice 132 } // end of namespace Ice
138 133
139 #endif // SUBZERO_SRC_ICEDEFS_H 134 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « src/IceClFlags.h ('k') | src/IceFixups.h » ('j') | src/IceInstX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698