|
Jlm
|
#include <GraphWriter.hpp>
Public Member Functions | |
| ~Writer ()=default | |
| Writer ()=default | |
| Writer (const Writer &other)=delete | |
| Writer (Writer &&other)=delete | |
| Writer & | operator= (const Writer &other)=delete |
| Writer & | operator= (Writer &&other)=delete |
| Graph & | CreateGraph () |
| size_t | NumGraphs () const noexcept |
| Graph & | GetGraph (size_t index) |
| GraphElement * | GetElementFromProgramObject (uintptr_t object) const |
| template<typename T > | |
| GraphElement * | GetElementFromProgramObject (const T &object) const |
| void | mapProgramObjectToElement (GraphElement &element) |
| void | removeProgramObjectMapping (GraphElement &element) |
| void | Finalize () |
| void | outputAllGraphs (std::ostream &out, OutputFormat format) |
Private Member Functions | |
| Graph & | CreateSubGraph (Node &parentNode) |
| size_t | GetNextUniqueIdStubSuffix (const char *idStub) |
Private Attributes | |
| std::vector< std::unique_ptr< Graph > > | Graphs_ |
| std::unordered_map< std::string, size_t > | NextUniqueIdStubSuffix_ |
| std::unordered_map< uintptr_t, GraphElement * > | ProgramObjectMapping_ |
Friends | |
| Graph & | InOutNode::CreateSubgraph () |
| void | GraphElement::Finalize () |
Utility class for creating graphs in memory, and printing them to a human or machine readable format.
Definition at line 1086 of file GraphWriter.hpp.
|
default |
|
default |
|
delete |
|
delete |
| Graph & jlm::util::graph::Writer::CreateGraph | ( | ) |
Creates a new graph and appends it to the GraphWriter's list of graphs.
Definition at line 1763 of file GraphWriter.cpp.
Definition at line 1784 of file GraphWriter.cpp.
| void jlm::util::graph::Writer::Finalize | ( | ) |
Ensures that all graphs added to the graph writer so far are finalized. Recursively finalizes the GraphElements of each graph.
Definition at line 1837 of file GraphWriter.cpp.
|
inline |
Definition at line 1131 of file GraphWriter.hpp.
| GraphElement * jlm::util::graph::Writer::GetElementFromProgramObject | ( | uintptr_t | object | ) | const |
Attempts to find a GraphElement in one of the graphs that is associated with object
Definition at line 1792 of file GraphWriter.cpp.
| Graph & jlm::util::graph::Writer::GetGraph | ( | size_t | index | ) |
index, which must be lower than NumGraphs() Definition at line 1777 of file GraphWriter.cpp.
|
private |
Returns a unique suffix for the given idStub, starting at 0 and counting up
Definition at line 1830 of file GraphWriter.cpp.
| void jlm::util::graph::Writer::mapProgramObjectToElement | ( | GraphElement & | element | ) |
Creates a mapping from a GraphElement's assigned program object to the GraphElement. The GraphElement can belong to any Graph in the writer.
| element | the graph element to map |
Definition at line 1800 of file GraphWriter.cpp.
|
noexcept |
Definition at line 1771 of file GraphWriter.cpp.
| void jlm::util::graph::Writer::outputAllGraphs | ( | std::ostream & | out, |
| OutputFormat | format | ||
| ) |
Finalizes and prints all graphs created in this GraphWriter.
| out | the output stream to write graphs to |
| format | the format to emit the graphs in |
Definition at line 1845 of file GraphWriter.cpp.
| void jlm::util::graph::Writer::removeProgramObjectMapping | ( | GraphElement & | element | ) |
Removes the mapping of a program object to a graph element.
| element | the element that is currently mapped to a program object, whose mapping should be removed. |
Definition at line 1813 of file GraphWriter.cpp.
|
friend |
|
friend |
|
private |
Definition at line 1190 of file GraphWriter.hpp.
|
private |
Definition at line 1193 of file GraphWriter.hpp.
|
private |
Definition at line 1198 of file GraphWriter.hpp.