All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cthread_analyzer.h
Go to the documentation of this file.
1 #ifndef CTHREAD_ANALYZER_H_INCLUDED_
2 #define CTHREAD_ANALYZER_H_INCLUDED_
3 
4 #include "rose.h"
5 
6 #include <vector>
7 #include <set>
8 #include <utility>
9 
10 namespace risc
11 {
12 
13 class Module;
14 class CThread;
15 class Port;
16 
17 typedef std::vector<CThread*> CThreadVector;
18 
19 namespace sa
20 {
21 
22 typedef std::pair<Port*, SgBoolValExp*> ResetSignal;
23 
24 
26 typedef std::pair<CThread*, std::set<SgVariableSymbol*> >
28 typedef std::set<CThreadUninitializedVariables>
30 
32 typedef std::pair<ResetSignal*, CThreadVector> ResetSignalSensitiveCThreads;
33 typedef std::set<ResetSignalSensitiveCThreads> ResetSignalSensitiveCThreadsSet;
34 
36 typedef std::pair<ResetSignal*, std::set<SgVariableSymbol*> >
38 typedef std::set<ResetSignalUninitializedVariables>
40 
41 
42 typedef std::pair<CThread*, ResetSignal*>
44 typedef std::pair<CThreadResetSignalPair, std::vector<SgExpression*> >
46 typedef std::vector<CThreadResetSignalExpressions>
48 
53 SgFunctionCallExp* find_first_wait_stmt(SgFunctionDefinition *func_def);
54 
55 
62 std::set<SgFunctionCallExp*>
63 traverse_for_non_nested_func_calls(SgFunctionDefinition *func_def);
64 
65 
70 void
71 collect_non_nested_expressions(SgFunctionDefinition *func_def,
72  std::vector<SgExpression*> &before_wait,
73  std::vector<SgExpression*> &after_wait);
74 
77 
79 inter_thread_analysis(Module &module, CThreadVector *subset_of_cthreads = NULL);
80 
83 
86 
89 
92 
93 void
94 member_variable_filter(risc::Module &module, std::vector<SgNode*> variable);
95 
96 void
98  SgFunctionDefinition *root_function,
99  std::vector<SgExpression*> &expressions);
100 
101 std::set<SgFunctionDefinition*>
102 get_called_functions_and_expressions(SgFunctionDefinition *root_function,
103  std::vector<SgExpression*> &expressions);
104 
105 } // end namesapce sa
106 
107 } // end namespace risc
108 
109 #endif /* CTHREAD_ANALYZER_H_INCLUDED_ */
110 
111 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
std::vector< CThreadResetSignalExpressions > CThreadResetSignalExpressionsVector
Definition: cthread_analyzer.h:47
std::set< SgFunctionCallExp * > traverse_for_non_nested_func_calls(SgFunctionDefinition *func_def)
This function searchs for all function calls which are done before the first wait call statement...
Definition: cthread_analyzer.cpp:55
std::pair< CThread *, ResetSignal * > CThreadResetSignalPair
Definition: cthread_analyzer.h:43
std::pair< Port *, SgBoolValExp * > ResetSignal
Definition: cthread_analyzer.h:22
ResetSignalUninitializedVariablesSet inter_async_reset_cthread_analysis(Module &module)
Definition: cthread_analyzer.cpp:809
std::pair< ResetSignal *, CThreadVector > ResetSignalSensitiveCThreads
ResetSignal -&gt; cthread, cthread, cthread ...
Definition: cthread_analyzer.h:32
std::vector< CThread * > CThreadVector
Definition: cthread.h:54
std::set< ResetSignalSensitiveCThreads > ResetSignalSensitiveCThreadsSet
Definition: cthread_analyzer.h:33
std::pair< ResetSignal *, std::set< SgVariableSymbol * > > ResetSignalUninitializedVariables
ResetSignal -&gt; var, var, var ...
Definition: cthread_analyzer.h:37
CThreadResetSignalExpressionsVector get_cthread_reset_signal_expressions(Module &module)
Definition: cthread_analyzer.cpp:678
CThreadResetSignalExpressionsVector get_cthread_async_reset_signal_expressions(Module &module)
Definition: cthread_analyzer.cpp:546
std::set< SgFunctionDefinition * > get_called_functions_and_expressions(SgFunctionDefinition *root_function, std::vector< SgExpression * > &expressions)
Definition: cthread_analyzer.cpp:88
void get_recursivly_nested_expressions_in_function(SgFunctionDefinition *root_function, std::vector< SgExpression * > &expressions)
Definition: cthread_analyzer.cpp:145
std::pair< CThreadResetSignalPair, std::vector< SgExpression * > > CThreadResetSignalExpressions
Definition: cthread_analyzer.h:45
This class represents instances.
Definition: module.h:49
ResetSignalUninitializedVariablesSet inter_reset_cthread_analysis(Module &module)
Definition: cthread_analyzer.cpp:1028
CThreadUninitializedVariablesSet most_pessimistic_analysis(risc::Module &module)
Definition: cthread_analyzer.cpp:247
std::set< CThreadUninitializedVariables > CThreadUninitializedVariablesSet
Definition: cthread_analyzer.h:29
std::pair< CThread *, std::set< SgVariableSymbol * > > CThreadUninitializedVariables
CThread -&gt; var, var, var ...
Definition: cthread_analyzer.h:27
CThreadUninitializedVariablesSet inter_thread_analysis(Module &module, CThreadVector *subset_of_cthreads=NULL)
Definition: cthread_analyzer.cpp:387
void member_variable_filter(risc::Module &module, std::vector< SgNode * > variable)
std::set< ResetSignalUninitializedVariables > ResetSignalUninitializedVariablesSet
Definition: cthread_analyzer.h:39
SgFunctionCallExp * find_first_wait_stmt(SgFunctionDefinition *func_def)
This function analyzes a given function and returns the first occurrence of a wait call...
Definition: cthread_analyzer.cpp:16
void collect_non_nested_expressions(SgFunctionDefinition *func_def, std::vector< SgExpression * > &before_wait, std::vector< SgExpression * > &after_wait)
This function collects all non nested expressions before and after the first wait stmt call...
Definition: cthread_analyzer.cpp:173