ROSE
0.11.21.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
src
midend
programAnalysis
genericDataflow
simpleAnalyses
placeUIDs.h
1
#ifndef PLACE_UIDS_H
2
#define PLACE_UIDS_H
3
4
#include "genericDataflowCommon.h"
5
#include "VirtualCFGIterator.h"
6
#include "cfgUtils.h"
7
#include "CallGraphTraverse.h"
8
#include "analysisCommon.h"
9
#include "analysis.h"
10
#include "dataflow.h"
11
#include "latticeFull.h"
12
#include "printAnalysisStates.h"
13
14
extern
int
sgnAnalysisDebugLevel;
15
16
/* Assigns a unique numeric ID to each DataflowNode. IDs are unique only within each function and
17
may be repeated across functions. */
18
19
class
NodeID
:
public
NodeFact
20
{
21
int
id;
22
public
:
23
24
NodeID
(
int
id
): id(
id
) {}
25
26
int
getID();
27
28
// The string that represents this object.
29
// Every line of this string must be prefixed by indent.
30
// The last character of the returned string must not be '\n', even if it is a multi-line string.
31
std::string str(std::string indent=
""
);
32
33
// returns a copy of this node fact
34
NodeFact
* copy()
const
;
35
};
36
37
class
placeUniqueIDs
:
public
UnstructuredPassIntraAnalysis
38
{
39
int
curID;
40
public
:
41
placeUniqueIDs
()
42
{
43
curID = 0;
44
}
45
46
void
visit(
const
Function
& func,
const
DataflowNode
& n,
NodeState
& state);
47
};
48
49
// Runs the placeUniqueIDs analysis to associate a unique ID with each DataflowNode within each function
50
void
runPlaceUniqueIDs();
51
52
// Returns the Unique ID recorded in the given NodeState
53
int
getNodeID(
const
NodeState
& state);
54
55
#endif
Function
Definition:
CallGraphTraverse.h:17
UnstructuredPassIntraAnalysis
Definition:
analysis.h:73
NodeState
Definition:
nodeState.h:89
placeUniqueIDs
Definition:
placeUIDs.h:37
NodeFact
Definition:
nodeState.h:31
NodeID
Definition:
placeUIDs.h:19
VirtualCFG::DataflowNode
Definition:
DataflowCFG.h:16
Generated on Mon Feb 22 2021 05:40:59 for ROSE by
1.8.10