OpenADFortTk (including Open64 and OpenAnalysis references)
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
UsefulStandard.hpp
Go to the documentation of this file.
1
16
#ifndef UsefulStandard_hpp
17
#define UsefulStandard_hpp
18
19
#include <cassert>
20
#include <iostream>
21
#include <map>
22
#include <set>
23
#include <vector>
24
#include <
OpenAnalysis/Utils/OA_ptr.hpp
>
25
#include <
OpenAnalysis/IRInterface/IRHandles.hpp
>
26
#include <
OpenAnalysis/ReachDefs/Interface.hpp
>
27
#include <
OpenAnalysis/DataFlow/LocDFSet.hpp
>
28
#include <
OpenAnalysis/OABase/Annotation.hpp
>
29
30
namespace
OA {
31
namespace
Activity {
32
33
34
35
class
UsefulStandard
:
public
virtual
Annotation
{
36
public
:
37
UsefulStandard
(
ProcHandle
p);
38
~UsefulStandard
() {}
39
42
OA_ptr<LocIterator>
getDepSetIterator
();
43
46
OA_ptr<LocIterator>
getInUsefulIterator
(
StmtHandle
s);
47
50
OA_ptr<LocIterator>
getOutUsefulIterator
(
StmtHandle
s);
51
52
//OA_ptr<DataFlow::LocDFSet> getFinalUseful();
53
55
int
getNumIter
() {
return
mNumIter
; }
56
57
//*****************************************************************
58
// Construction methods
59
//*****************************************************************
60
62
void
insertDepLoc
(
OA_ptr<Location>
loc)
63
{
mDepLocSet
->
insert
(loc); }
64
66
void
copyIntoInUseful
(
StmtHandle
s,
67
OA_ptr<DataFlow::LocDFSet>
dfset)
68
{
69
OA_ptr<DataFlow::DataFlowSet>
cloneDFset = dfset->
clone
();
70
mInUseful
[s] = cloneDFset.
convert
<
DataFlow::LocDFSet
>();
71
}
72
74
void
copyIntoOutUseful
(
StmtHandle
s,
75
OA_ptr<DataFlow::LocDFSet>
dfset)
76
{
77
OA_ptr<DataFlow::DataFlowSet>
cloneDFset = dfset->
clone
();
78
mOutUseful
[s] = cloneDFset.
convert
<
DataFlow::LocDFSet
>();
79
}
80
82
void
copyIntoCallOutUseful
(
CallHandle
c,
83
OA_ptr<DataFlow::LocDFSet>
dfset)
84
{
85
OA_ptr<DataFlow::DataFlowSet>
cloneDFset = dfset->
clone
();
86
mCallOutUseful
[c] = cloneDFset.
convert
<
DataFlow::LocDFSet
>();
87
}
88
90
//void mapFinalUseful(OA_ptr<DataFlow::LocDFSet> final);
91
93
void
setNumIter
(
int
n
) {
mNumIter
=
n
; }
94
96
//void mapProcToUseful(ProcHandle proc, OA_ptr<UsefulStandard> useful)
97
// { mProcToUsefulMap[proc] = useful; }
98
99
//*****************************************************************
100
// Output
101
//*****************************************************************
102
105
void
dump
(std::ostream& os,
OA_ptr<IRHandlesIRInterface>
ir);
106
107
//*****************************************************************
108
// Annotation Interface
109
//*****************************************************************
110
void
output
(
IRHandlesIRInterface
&ir);
111
112
private
:
113
// data members
114
std::map<StmtHandle,OA_ptr<DataFlow::LocDFSet> >
mInUseful
;
115
std::map<StmtHandle,OA_ptr<DataFlow::LocDFSet> >
mOutUseful
;
116
std::map<CallHandle,OA_ptr<DataFlow::LocDFSet> >
mCallOutUseful
;
117
OA_ptr<DataFlow::LocDFSet>
mDepLocSet
;
118
//OA_ptr<DataFlow::LocDFSet> mFinalInUseful;
119
//std::map<ProcHandle,OA_ptr<UsefulStandard> > mProcToUsefulMap;
120
int
mNumIter
;
121
122
};
123
124
}
// end of Activity namespace
125
}
// end of OA namespace
126
127
#endif
128
OpenAnalysis
src
OpenAnalysis
Activity
UsefulStandard.hpp
Generated on Fri Mar 14 2014 04:23:06 for OpenADFortTk (including Open64 and OpenAnalysis references) by
1.8.4