| 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 22 matching lines...) Expand all Loading... |
| 33 public: | 33 public: |
| 34 ~Cfg(); | 34 ~Cfg(); |
| 35 | 35 |
| 36 static std::unique_ptr<Cfg> create(GlobalContext *Ctx, | 36 static std::unique_ptr<Cfg> create(GlobalContext *Ctx, |
| 37 uint32_t SequenceNumber) { | 37 uint32_t SequenceNumber) { |
| 38 return std::unique_ptr<Cfg>(new Cfg(Ctx, SequenceNumber)); | 38 return std::unique_ptr<Cfg>(new Cfg(Ctx, SequenceNumber)); |
| 39 } | 39 } |
| 40 | 40 |
| 41 GlobalContext *getContext() const { return Ctx; } | 41 GlobalContext *getContext() const { return Ctx; } |
| 42 uint32_t getSequenceNumber() const { return SequenceNumber; } | 42 uint32_t getSequenceNumber() const { return SequenceNumber; } |
| 43 OptLevel getOptLevel() const { return OptimizationLevel; } |
| 43 | 44 |
| 44 static constexpr VerboseMask defaultVerboseMask() { | 45 static constexpr VerboseMask defaultVerboseMask() { |
| 45 return (IceV_NO_PER_PASS_DUMP_BEYOND << 1) - 1; | 46 return (IceV_NO_PER_PASS_DUMP_BEYOND << 1) - 1; |
| 46 } | 47 } |
| 47 /// Returns true if any of the specified options in the verbose mask are set. | 48 /// Returns true if any of the specified options in the verbose mask are set. |
| 48 /// If the argument is omitted, it checks if any verbose options at all are | 49 /// If the argument is omitted, it checks if any verbose options at all are |
| 49 /// set. | 50 /// set. |
| 50 bool isVerbose(VerboseMask Mask = defaultVerboseMask()) const { | 51 bool isVerbose(VerboseMask Mask = defaultVerboseMask()) const { |
| 51 return VMask & Mask; | 52 return VMask & Mask; |
| 52 } | 53 } |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 BVT_StackPointer, | 290 BVT_StackPointer, |
| 290 BVT_FramePointer, | 291 BVT_FramePointer, |
| 291 BVT_UserPointer | 292 BVT_UserPointer |
| 292 }; | 293 }; |
| 293 void sortAndCombineAllocas(CfgVector<Inst *> &Allocas, | 294 void sortAndCombineAllocas(CfgVector<Inst *> &Allocas, |
| 294 uint32_t CombinedAlignment, InstList &Insts, | 295 uint32_t CombinedAlignment, InstList &Insts, |
| 295 AllocaBaseVariableType BaseVariableType); | 296 AllocaBaseVariableType BaseVariableType); |
| 296 void findRematerializable(); | 297 void findRematerializable(); |
| 297 | 298 |
| 298 GlobalContext *Ctx; | 299 GlobalContext *Ctx; |
| 299 uint32_t SequenceNumber; /// output order for emission | 300 uint32_t SequenceNumber; /// output order for emission |
| 301 OptLevel OptimizationLevel = Opt_m1; |
| 300 uint32_t ConstantBlindingCookie = 0; /// cookie for constant blinding | 302 uint32_t ConstantBlindingCookie = 0; /// cookie for constant blinding |
| 301 VerboseMask VMask; | 303 VerboseMask VMask; |
| 302 GlobalString FunctionName; | 304 GlobalString FunctionName; |
| 303 Type ReturnType = IceType_void; | 305 Type ReturnType = IceType_void; |
| 304 bool IsInternalLinkage = false; | 306 bool IsInternalLinkage = false; |
| 305 bool HasError = false; | 307 bool HasError = false; |
| 306 bool FocusedTiming = false; | 308 bool FocusedTiming = false; |
| 307 std::string ErrorMessage = ""; | 309 std::string ErrorMessage = ""; |
| 308 CfgNode *Entry = nullptr; /// entry basic block | 310 CfgNode *Entry = nullptr; /// entry basic block |
| 309 NodeList Nodes; /// linearized node list; Entry should be first | 311 NodeList Nodes; /// linearized node list; Entry should be first |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 using OwnerType = Cfg; | 350 using OwnerType = Cfg; |
| 349 static StringPool *getStrings(const OwnerType *PoolOwner) { | 351 static StringPool *getStrings(const OwnerType *PoolOwner) { |
| 350 return PoolOwner->getVarStrings(); | 352 return PoolOwner->getVarStrings(); |
| 351 } | 353 } |
| 352 }; | 354 }; |
| 353 using VariableString = StringID<VariableStringPoolTraits>; | 355 using VariableString = StringID<VariableStringPoolTraits>; |
| 354 | 356 |
| 355 } // end of namespace Ice | 357 } // end of namespace Ice |
| 356 | 358 |
| 357 #endif // SUBZERO_SRC_ICECFG_H | 359 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |