00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #ifndef SHCFGBLOCK_HPP
00021 #define SHCFGBLOCK_HPP
00022
00023 #include <list>
00024 #include "ShBlock.hpp"
00025 #include "ShCtrlGraph.hpp"
00026
00027 namespace SH {
00028
00034 class
00035 SH_DLLEXPORT
00036 ShCfgBlock : public ShBlock {
00037 public:
00038 ShCfgBlock(const ShProgram &program, bool copy=true);
00039 ShCfgBlock(ShCtrlGraphPtr cfg, bool copy=true);
00040 ShCfgBlock(ShCtrlGraphNodePtr node, bool copy=true);
00041
00042 ~ShCfgBlock();
00043
00044 ShCtrlGraphNodePtr entry() const;
00045 ShCtrlGraphNodePtr exit() const;
00046
00047 void print(std::ostream& out, int indent) const;
00048 void graphvizDump(std::ostream& out) const;
00049
00050
00051 private:
00052 void init(ShCtrlGraphPtr cfg, bool copy);
00053 ShCtrlGraphNodePtr m_entry, m_exit;
00054 };
00055
00056 typedef ShPointer<ShCfgBlock> ShCfgBlockPtr;
00057 typedef ShPointer<const ShCfgBlock> ShCfgBlockCPtr;
00058
00059 }
00060
00061 #endif