Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
systemc-clang
Commits
d905b5bd
Commit
d905b5bd
authored
Aug 24, 2014
by
Anirudh Kaushik
Browse files
Revamp of path enumeration logic
parent
61065098
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
src/SuspensionAutomata.cpp
View file @
d905b5bd
This diff is collapsed.
Click to expand it.
src/SuspensionAutomata.h
View file @
d905b5bd
...
...
@@ -112,6 +112,12 @@ namespace scpar {
typedef
vector
<
SusCFG
*
>
susCFGVectorType
;
typedef
vector
<
Transition
*>
transitionVectorType
;
typedef
pair
<
SusCFG
*
,
int
>
susCFGSuccIDPairType
;
typedef
map
<
SusCFG
*
,
int
>
susCFGSuccIDMapType
;
typedef
pair
<
SusCFG
*
,
State
*
>
susCFGStatePairType
;
typedef
map
<
SusCFG
*
,
State
*
>
susCFGStateMapType
;
SuspensionAutomata
(
FindWait
::
waitListType
,
CXXMethodDecl
*
,
ASTContext
*
,
raw_ostream
&
);
...
...
@@ -119,9 +125,10 @@ namespace scpar {
bool
isFound
(
vector
<
SusCFG
*
>
,
SusCFG
*
);
bool
isFound
(
vector
<
Transition
*
>
,
Transition
*
);
void
initialize
();
bool
initialize
();
void
genSusCFG
();
void
genSauto
();
vector
<
SusCFG
*>
modifDFS
(
SusCFG
*
,
State
*
);
bool
isWaitCall
(
const
CFGStmt
*
cs
);
bool
isTimedWait
(
Stmt
*
stmt
);
bool
isDeltaWait
(
Stmt
*
stmt
);
...
...
@@ -139,12 +146,13 @@ namespace scpar {
private:
CXXMethodDecl
*
_d
;
FindWait
::
waitListType
_waitCalls
;
susCFGSuccIDMapType
susCFGSuccIDMap
;
susCFGStateMapType
susCFGStateMap
;
CFG
*
_cfg
;
ASTContext
*
_a
;
raw_ostream
&
_os
;
susCFGVectorType
_susCFGVector
;
transitionVectorType
_transitionVector
;
};
// End class SplitWaitBlocks
}
// End namespace scpar
#endif
src/SystemCClang.cpp
View file @
d905b5bd
...
...
@@ -79,15 +79,20 @@ bool SystemCConsumer::fire()
FindNotify
findNotify
(
ef
->
_entryMethodDecl
,
_os
);
ef
->
addNotifys
(
findNotify
);
SuspensionAutomata
suspensionAutomata
(
findWaits
.
getWaitCalls
(),
ef
->
getEntryMethod
(),
&
_context
,
llvm
::
errs
());
suspensionAutomata
.
initialize
();
suspensionAutomata
.
genSusCFG
();
suspensionAutomata
.
genSauto
();
if
(
suspensionAutomata
.
initialize
())
{
suspensionAutomata
.
genSusCFG
();
suspensionAutomata
.
dumpSusCFG
();
suspensionAutomata
.
genSauto
();
suspensionAutomata
.
dumpSauto
();
ef
->
addSusCFGAuto
(
suspensionAutomata
);
}
ef
->
addSusCFGAuto
(
suspensionAutomata
);
_entryFunctionContainerVector
.
push_back
(
ef
);
}
}
_systemcModel
->
addModuleDecl
(
md
);
}
...
...
src/SystemCClang.h
View file @
d905b5bd
...
...
@@ -55,8 +55,7 @@ using namespace clang;
namespace
scpar
{
class
SystemCConsumer
:
public
ASTConsumer
,
public
RecursiveASTVisitor
<
SystemCConsumer
>
class
SystemCConsumer
:
public
ASTConsumer
,
public
RecursiveASTVisitor
<
SystemCConsumer
>
{
private:
...
...
@@ -65,8 +64,6 @@ namespace scpar
llvm
::
raw_ostream
&
_os
;
SourceManager
&
_sm
;
SystemCConsumer
(
CompilerInstance
&
);
~
SystemCConsumer
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment