Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 27 matching lines...) Expand all Loading... | |
| 38 #include "llvm/ADT/STLExtras.h" | 38 #include "llvm/ADT/STLExtras.h" |
| 39 #include "llvm/Support/Allocator.h" | 39 #include "llvm/Support/Allocator.h" |
| 40 #include "llvm/Support/Casting.h" | 40 #include "llvm/Support/Casting.h" |
| 41 #include "llvm/Support/ELF.h" | 41 #include "llvm/Support/ELF.h" |
| 42 #include "llvm/Support/raw_ostream.h" | 42 #include "llvm/Support/raw_ostream.h" |
| 43 | 43 |
| 44 #include "IceTLS.h" | 44 #include "IceTLS.h" |
| 45 | 45 |
| 46 namespace Ice { | 46 namespace Ice { |
| 47 | 47 |
| 48 constexpr bool buildAllowsAsserts() { | |
|
John
2015/06/23 22:28:30
optional: As we spoke during our walk back, it see
Jim Stichnoth
2015/06/24 21:27:27
Done. I went with BuildDefs::asserts(), and simil
| |
| 49 #ifdef NDEBUG | |
|
John
2015/06/23 22:28:30
This is a bit surprising to me. I always though
-
Jim Stichnoth
2015/06/24 21:27:27
Yep, NDEBUG is either defined or not, and its valu
| |
| 50 return false; | |
| 51 #else // !NDEBUG | |
| 52 return true; | |
| 53 #endif // !NDEBUG | |
| 54 } | |
| 55 | |
| 56 constexpr bool buildAllowsExtraValidation() { | |
| 57 #ifdef ALLOW_EXTRA_VALIDATION | |
|
John
2015/06/23 22:28:30
probably just
#if ALLOW_EXTRA_VALIDATION
?
Othe
Jim Stichnoth
2015/06/24 21:27:27
Done.
| |
| 58 return true; | |
| 59 #else // !ALLOW_EXTRA_VALIDATION | |
| 60 return false; | |
| 61 #endif // !ALLOW_EXTRA_VALIDATION | |
| 62 } | |
| 63 | |
| 64 constexpr bool buildAllowsDump() { | |
| 65 #if defined(ALLOW_DUMP) && ALLOW_DUMP | |
|
John
2015/06/23 22:28:30
this can be simply
#if ALLOW_DUMP
(see https://
Jim Stichnoth
2015/06/24 21:27:27
Done.
| |
| 66 return true; | |
| 67 #else // !ALLOW_DUMP | |
| 68 return false; | |
| 69 #endif // !ALLOW_DUMP | |
| 70 } | |
| 71 | |
| 48 class Assembler; | 72 class Assembler; |
| 49 class Cfg; | 73 class Cfg; |
| 50 class CfgNode; | 74 class CfgNode; |
| 51 class Constant; | 75 class Constant; |
| 52 class ELFObjectWriter; | 76 class ELFObjectWriter; |
| 53 class ELFStreamer; | 77 class ELFStreamer; |
| 54 class FunctionDeclaration; | 78 class FunctionDeclaration; |
| 55 class GlobalContext; | 79 class GlobalContext; |
| 56 class GlobalDeclaration; | 80 class GlobalDeclaration; |
| 57 class Inst; | 81 class Inst; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { | 288 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { |
| 265 return llvm::make_range(Container.rbegin(), Container.rend()); | 289 return llvm::make_range(Container.rbegin(), Container.rend()); |
| 266 } | 290 } |
| 267 | 291 |
| 268 // Options for pooling and randomization of immediates | 292 // Options for pooling and randomization of immediates |
| 269 enum RandomizeAndPoolImmediatesEnum { RPI_None, RPI_Randomize, RPI_Pool }; | 293 enum RandomizeAndPoolImmediatesEnum { RPI_None, RPI_Randomize, RPI_Pool }; |
| 270 | 294 |
| 271 } // end of namespace Ice | 295 } // end of namespace Ice |
| 272 | 296 |
| 273 #endif // SUBZERO_SRC_ICEDEFS_H | 297 #endif // SUBZERO_SRC_ICEDEFS_H |
| OLD | NEW |