| OLD | NEW |
| 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// | 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- 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 /// \file | 10 /// \file |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 /// Gets a pointer to the current thread's Cfg's allocator. | 44 /// Gets a pointer to the current thread's Cfg's allocator. |
| 45 static ArenaAllocator<> *getCurrentCfgAllocator() { | 45 static ArenaAllocator<> *getCurrentCfgAllocator() { |
| 46 assert(ICE_TLS_GET_FIELD(CurrentCfg)); | 46 assert(ICE_TLS_GET_FIELD(CurrentCfg)); |
| 47 return ICE_TLS_GET_FIELD(CurrentCfg)->Allocator.get(); | 47 return ICE_TLS_GET_FIELD(CurrentCfg)->Allocator.get(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 GlobalContext *getContext() const { return Ctx; } | 50 GlobalContext *getContext() const { return Ctx; } |
| 51 uint32_t getSequenceNumber() const { return SequenceNumber; } | 51 uint32_t getSequenceNumber() const { return SequenceNumber; } |
| 52 | 52 |
| 53 static constexpr VerboseMask defaultVerboseMask() { |
| 54 return IceV_All & ~IceV_Status; |
| 55 } |
| 53 /// Returns true if any of the specified options in the verbose mask are set. | 56 /// Returns true if any of the specified options in the verbose mask are set. |
| 54 /// If the argument is omitted, it checks if any verbose options at all are | 57 /// If the argument is omitted, it checks if any verbose options at all are |
| 55 /// set. | 58 /// set. |
| 56 bool isVerbose(VerboseMask Mask = IceV_All) const { return VMask & Mask; } | 59 bool isVerbose(VerboseMask Mask = defaultVerboseMask()) const { |
| 60 return VMask & Mask; |
| 61 } |
| 57 void setVerbose(VerboseMask Mask) { VMask = Mask; } | 62 void setVerbose(VerboseMask Mask) { VMask = Mask; } |
| 58 | 63 |
| 59 /// \name Manage the name and return type of the function being translated. | 64 /// \name Manage the name and return type of the function being translated. |
| 60 /// @{ | 65 /// @{ |
| 61 void setFunctionName(const IceString &Name) { FunctionName = Name; } | 66 void setFunctionName(const IceString &Name) { FunctionName = Name; } |
| 62 IceString getFunctionName() const { return FunctionName; } | 67 IceString getFunctionName() const { return FunctionName; } |
| 63 void setReturnType(Type Ty) { ReturnType = Ty; } | 68 void setReturnType(Type Ty) { ReturnType = Ty; } |
| 64 /// @} | 69 /// @} |
| 65 | 70 |
| 66 /// \name Manage the "internal" attribute of the function. | 71 /// \name Manage the "internal" attribute of the function. |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 306 |
| 302 public: | 307 public: |
| 303 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } | 308 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } |
| 304 }; | 309 }; |
| 305 | 310 |
| 306 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); | 311 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); |
| 307 | 312 |
| 308 } // end of namespace Ice | 313 } // end of namespace Ice |
| 309 | 314 |
| 310 #endif // SUBZERO_SRC_ICECFG_H | 315 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |