| OLD | NEW |
| 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// | 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// |
| 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 implements the Cfg class, including constant pool | 10 // This file implements the Cfg class, including constant pool |
| 11 // management. | 11 // management. |
| 12 // | 12 // |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #include "assembler.h" | 15 #include "assembler.h" |
| 16 #include "IceCfg.h" | 16 #include "IceCfg.h" |
| 17 #include "IceCfgNode.h" | 17 #include "IceCfgNode.h" |
| 18 #include "IceClFlags.h" | 18 #include "IceClFlags.h" |
| 19 #include "IceDefs.h" | 19 #include "IceDefs.h" |
| 20 #include "IceELFObjectWriter.h" | 20 #include "IceELFObjectWriter.h" |
| 21 #include "IceInst.h" | 21 #include "IceInst.h" |
| 22 #include "IceLiveness.h" | 22 #include "IceLiveness.h" |
| 23 #include "IceOperand.h" | 23 #include "IceOperand.h" |
| 24 #include "IceTargetLowering.h" | 24 #include "IceTargetLowering.h" |
| 25 | 25 |
| 26 namespace Ice { | 26 namespace Ice { |
| 27 | 27 |
| 28 thread_local const Cfg *Cfg::CurrentCfg = nullptr; | 28 ICE_ATTRIBUTE_TLS const Cfg *Cfg::CurrentCfg = nullptr; |
| 29 | 29 |
| 30 ArenaAllocator<> *getCurrentCfgAllocator() { | 30 ArenaAllocator<> *getCurrentCfgAllocator() { |
| 31 return Cfg::getCurrentCfgAllocator(); | 31 return Cfg::getCurrentCfgAllocator(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 Cfg::Cfg(GlobalContext *Ctx) | 34 Cfg::Cfg(GlobalContext *Ctx) |
| 35 : Ctx(Ctx), FunctionName(""), ReturnType(IceType_void), | 35 : Ctx(Ctx), FunctionName(""), ReturnType(IceType_void), |
| 36 IsInternalLinkage(false), HasError(false), FocusedTiming(false), | 36 IsInternalLinkage(false), HasError(false), FocusedTiming(false), |
| 37 ErrorMessage(""), Entry(nullptr), NextInstNumber(Inst::NumberInitial), | 37 ErrorMessage(""), Entry(nullptr), NextInstNumber(Inst::NumberInitial), |
| 38 Allocator(new ArenaAllocator<>()), Live(nullptr), | 38 Allocator(new ArenaAllocator<>()), Live(nullptr), |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 514 } |
| 515 } | 515 } |
| 516 // Print each basic block | 516 // Print each basic block |
| 517 for (CfgNode *Node : Nodes) | 517 for (CfgNode *Node : Nodes) |
| 518 Node->dump(this); | 518 Node->dump(this); |
| 519 if (getContext()->isVerbose(IceV_Instructions)) | 519 if (getContext()->isVerbose(IceV_Instructions)) |
| 520 Str << "}\n"; | 520 Str << "}\n"; |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // end of namespace Ice | 523 } // end of namespace Ice |
| OLD | NEW |