Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Valentin Touzeau
lruzdd
Commits
ca015ae4
Commit
ca015ae4
authored
Jul 11, 2019
by
Valentin Touzeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update otawa
parent
e424a28f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
55 deletions
+55
-55
src/ClassificationBuilder.cpp
src/ClassificationBuilder.cpp
+1
-1
src/MayAnalysis/GlobalMayAnalysis.cpp
src/MayAnalysis/GlobalMayAnalysis.cpp
+8
-8
src/MayAnalysis/MayAnalysis.cpp
src/MayAnalysis/MayAnalysis.cpp
+19
-19
src/MustAnalysis/GlobalMustAnalysis.cpp
src/MustAnalysis/GlobalMustAnalysis.cpp
+8
-8
src/MustAnalysis/MustAnalysis.cpp
src/MustAnalysis/MustAnalysis.cpp
+19
-19
No files found.
src/ClassificationBuilder.cpp
View file @
ca015ae4
...
...
@@ -29,7 +29,7 @@ protected:
BasicBlock
*
bb
=
b
->
toBasic
();
for
(
Block
::
EdgeIter
edgeIter
(
bb
->
ins
());
edgeIter
;
++
edgeIter
)
{
for
(
Block
::
EdgeIter
edgeIter
(
bb
->
ins
());
edgeIter
()
;
++
edgeIter
)
{
Edge
*
e
=
*
edgeIter
;
Bag
<
icache
::
Access
>&
bag
=
icache
::
ACCESSES
(
e
).
ref
();
processBag
(
bag
);
...
...
src/MayAnalysis/GlobalMayAnalysis.cpp
View file @
ca015ae4
...
...
@@ -66,8 +66,8 @@ public:
inline
store_t
&
store
(
void
)
{
return
m_store
;
}
void
update
(
const
Bag
<
icache
::
Access
>&
accs
,
t
&
d
)
{
for
(
auto
acc
=
*
accs
;
acc
;
acc
++
)
m_domain
.
update
(
acc
,
d
);
for
(
auto
acc
=
*
accs
;
acc
()
;
acc
++
)
m_domain
.
update
(
*
acc
,
d
);
}
void
update
(
Block
*
v
,
t
&
d
)
{
...
...
@@ -76,7 +76,7 @@ public:
t
s
;
// update and join along edges
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
;
e
++
)
{
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
()
;
e
++
)
{
Block
*
w
=
e
->
source
();
m_domain
.
copy
(
s
,
m_store
.
get
(
w
));
...
...
@@ -89,7 +89,7 @@ public:
// apply edge
{
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
e
);
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
*
e
);
if
(
accs
.
count
()
>
0
)
update
(
accs
,
s
);
}
...
...
@@ -192,8 +192,8 @@ private:
ai
::
SimpleAI
<
GlobalMayAdapter
>
ana
(
ada
);
ana
.
run
();
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
b
,
ada
.
store
().
get
(
b
));
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
()
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
*
b
,
ada
.
store
().
get
(
*
b
));
//ada.store().clear();
}
...
...
@@ -207,8 +207,8 @@ private:
Bag
<
icache
::
Access
>&
bAccs
=
icache
::
ACCESSES
(
b
).
ref
();
GlobalMayAdapter
::
t
save
=
classifyAccesses
(
b
,
focus
,
man
,
bAccs
);
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
e
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
e
).
ref
();
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
e
()
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
*
e
).
ref
();
man
.
restart
(
save
);
classifyAccesses
(
b
,
focus
,
man
,
eAccs
);
}
...
...
src/MayAnalysis/MayAnalysis.cpp
View file @
ca015ae4
...
...
@@ -65,8 +65,8 @@ public:
inline
store_t
&
store
(
void
)
{
return
m_store
;
}
void
update
(
const
Bag
<
icache
::
Access
>&
accs
,
t
&
d
)
{
for
(
auto
acc
=
*
accs
;
acc
;
acc
++
)
m_domain
.
update
(
acc
,
d
);
for
(
auto
acc
=
*
accs
;
acc
()
;
acc
++
)
m_domain
.
update
(
*
acc
,
d
);
}
void
update
(
Block
*
v
,
t
&
d
)
{
...
...
@@ -75,7 +75,7 @@ public:
t
s
;
// update and join along edges
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
;
e
++
)
{
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
()
;
e
++
)
{
Block
*
w
=
e
->
source
();
m_domain
.
copy
(
s
,
m_store
.
get
(
w
));
...
...
@@ -88,7 +88,7 @@ public:
// apply edge
{
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
e
);
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
*
e
);
if
(
accs
.
count
()
>
0
)
update
(
accs
,
s
);
}
...
...
@@ -145,13 +145,13 @@ protected:
auto
start
=
std
::
chrono
::
system_clock
::
now
();
std
::
set
<
const
icat3
::
LBlock
*>
toRefine
;
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
;
b
++
)
{
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
()
;
b
++
)
{
if
(
!
b
->
isBasic
())
continue
;
BasicBlock
*
bb
=
b
->
toBasic
();
for
(
Block
::
EdgeIter
edgeIter
(
bb
->
ins
());
edgeIter
;
++
edgeIter
)
{
for
(
Block
::
EdgeIter
edgeIter
(
bb
->
ins
());
edgeIter
()
;
++
edgeIter
)
{
Edge
*
e
=
*
edgeIter
;
Bag
<
icache
::
Access
>&
bag
=
icache
::
ACCESSES
(
e
).
ref
();
processBag
(
toRefine
,
bag
);
...
...
@@ -209,8 +209,8 @@ private:
ai
::
SimpleAI
<
MayAdapter
>
ana
(
ada
);
ana
.
run
();
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
b
,
ada
.
store
().
get
(
b
));
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
()
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
*
b
,
ada
.
store
().
get
(
*
b
));
ada
.
store
().
clear
();
}
...
...
@@ -224,8 +224,8 @@ private:
Bag
<
icache
::
Access
>&
bAccs
=
icache
::
ACCESSES
(
b
).
ref
();
MayAdapter
::
t
save
=
classifyAccesses
(
b
,
focus
,
man
,
bAccs
);
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
e
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
e
).
ref
();
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
e
()
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
*
e
).
ref
();
man
.
restart
(
save
);
classifyAccesses
(
b
,
focus
,
man
,
eAccs
);
}
...
...
@@ -239,20 +239,20 @@ private:
for
(
int
i
=
0
;
i
<
accs
.
size
();
++
i
)
{
icat3
::
LBlock
*
lb
=
icat3
::
LBLOCK
(
accs
[
i
]);
if
(
lb
==
focus
)
{
//
if(logFor(LOG_BLOCK)) {
//
log << "\t\tFunction " << b->cfg()->label() << ", ";
//
log << const_cast<Block*>(b) << ": " << io::endl;
//
log << "\t\t\tAccess (" << accs[i] << ") is ";
//
}
if
(
logFor
(
LOG_BLOCK
))
{
log
<<
"
\t\t
Function "
<<
b
->
cfg
()
->
label
()
<<
", "
;
log
<<
const_cast
<
Block
*>
(
b
)
<<
": "
<<
io
::
endl
;
log
<<
"
\t\t\t
Access ("
<<
accs
[
i
]
<<
") is "
;
}
if
(
man
.
alwaysMiss
())
{
MISS_CATEGORY
(
accs
[
i
])
=
MissCategory
::
AM
;
//
if(logFor(LOG_BLOCK))
//
log << "AM" << elm::io::endl;
if
(
logFor
(
LOG_BLOCK
))
log
<<
"AM"
<<
elm
::
io
::
endl
;
}
else
{
MISS_CATEGORY
(
accs
[
i
])
=
MissCategory
::
NC
;
//
if(logFor(LOG_BLOCK))
//
log << "NC" << elm::io::endl;
if
(
logFor
(
LOG_BLOCK
))
log
<<
"NC"
<<
elm
::
io
::
endl
;
}
}
man
.
update
(
accs
[
i
]);
...
...
src/MustAnalysis/GlobalMustAnalysis.cpp
View file @
ca015ae4
...
...
@@ -66,8 +66,8 @@ public:
inline
store_t
&
store
(
void
)
{
return
m_store
;
}
void
update
(
const
Bag
<
icache
::
Access
>&
accs
,
t
&
d
)
{
for
(
auto
acc
=
*
accs
;
acc
;
acc
++
)
m_domain
.
update
(
acc
,
d
);
for
(
auto
acc
=
*
accs
;
acc
()
;
acc
++
)
m_domain
.
update
(
*
acc
,
d
);
}
void
update
(
Block
*
v
,
t
&
d
)
{
...
...
@@ -76,7 +76,7 @@ public:
t
s
;
// update and join along edges
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
;
e
++
)
{
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
()
;
e
++
)
{
Block
*
w
=
e
->
source
();
m_domain
.
copy
(
s
,
m_store
.
get
(
w
));
...
...
@@ -89,7 +89,7 @@ public:
// apply edge
{
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
e
);
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
*
e
);
if
(
accs
.
count
()
>
0
)
update
(
accs
,
s
);
}
...
...
@@ -192,8 +192,8 @@ private:
ai
::
SimpleAI
<
GlobalMustAdapter
>
ana
(
ada
);
ana
.
run
();
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
b
,
ada
.
store
().
get
(
b
));
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
()
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
*
b
,
ada
.
store
().
get
(
*
b
));
//ada.store().clear();
}
...
...
@@ -207,8 +207,8 @@ private:
Bag
<
icache
::
Access
>&
bAccs
=
icache
::
ACCESSES
(
b
).
ref
();
GlobalMustAdapter
::
t
save
=
classifyAccesses
(
b
,
focus
,
man
,
bAccs
);
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
e
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
e
).
ref
();
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
e
()
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
*
e
).
ref
();
man
.
restart
(
save
);
classifyAccesses
(
b
,
focus
,
man
,
eAccs
);
}
...
...
src/MustAnalysis/MustAnalysis.cpp
View file @
ca015ae4
...
...
@@ -65,8 +65,8 @@ public:
inline
store_t
&
store
(
void
)
{
return
m_store
;
}
void
update
(
const
Bag
<
icache
::
Access
>&
accs
,
t
&
d
)
{
for
(
auto
acc
=
*
accs
;
acc
;
acc
++
)
m_domain
.
update
(
acc
,
d
);
for
(
auto
acc
=
*
accs
;
acc
()
;
acc
++
)
m_domain
.
update
(
*
acc
,
d
);
}
void
update
(
Block
*
v
,
t
&
d
)
{
...
...
@@ -75,7 +75,7 @@ public:
t
s
;
// update and join along edges
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
;
e
++
)
{
for
(
auto
e
=
m_graph
.
preds
(
v
);
e
()
;
e
++
)
{
Block
*
w
=
e
->
source
();
m_domain
.
copy
(
s
,
m_store
.
get
(
w
));
...
...
@@ -88,7 +88,7 @@ public:
// apply edge
{
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
e
);
const
Bag
<
icache
::
Access
>&
accs
=
icache
::
ACCESSES
(
*
e
);
if
(
accs
.
count
()
>
0
)
update
(
accs
,
s
);
}
...
...
@@ -145,13 +145,13 @@ protected:
auto
start
=
std
::
chrono
::
system_clock
::
now
();
std
::
set
<
const
icat3
::
LBlock
*>
toRefine
;
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
;
b
++
)
{
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
()
;
b
++
)
{
if
(
!
b
->
isBasic
())
continue
;
BasicBlock
*
bb
=
b
->
toBasic
();
for
(
Block
::
EdgeIter
edgeIter
(
bb
->
ins
());
edgeIter
;
++
edgeIter
)
{
for
(
Block
::
EdgeIter
edgeIter
(
bb
->
ins
());
edgeIter
()
;
++
edgeIter
)
{
Edge
*
e
=
*
edgeIter
;
Bag
<
icache
::
Access
>&
bag
=
icache
::
ACCESSES
(
e
).
ref
();
processBag
(
toRefine
,
bag
);
...
...
@@ -209,8 +209,8 @@ private:
ai
::
SimpleAI
<
MustAdapter
>
ana
(
ada
);
ana
.
run
();
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
b
,
ada
.
store
().
get
(
b
));
for
(
CFGCollection
::
BlockIter
b
(
m_cfgs
);
b
()
;
b
++
)
classifyBlock
(
lb
,
ada
.
domain
(),
*
b
,
ada
.
store
().
get
(
*
b
));
ada
.
store
().
clear
();
}
...
...
@@ -224,8 +224,8 @@ private:
Bag
<
icache
::
Access
>&
bAccs
=
icache
::
ACCESSES
(
b
).
ref
();
MustAdapter
::
t
save
=
classifyAccesses
(
b
,
focus
,
man
,
bAccs
);
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
e
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
e
).
ref
();
for
(
Block
::
EdgeIter
e
=
b
->
outs
();
*
e
;
e
++
)
{
Bag
<
icache
::
Access
>&
eAccs
=
icache
::
ACCESSES
(
*
e
).
ref
();
man
.
restart
(
save
);
classifyAccesses
(
b
,
focus
,
man
,
eAccs
);
}
...
...
@@ -239,20 +239,20 @@ private:
for
(
int
i
=
0
;
i
<
accs
.
size
();
++
i
)
{
icat3
::
LBlock
*
lb
=
icat3
::
LBLOCK
(
accs
[
i
]);
if
(
lb
==
focus
)
{
//
if(logFor(LOG_BLOCK)) {
//
log << "\t\tFunction " << b->cfg()->label() << ", ";
//
log << const_cast<Block*>(b) << ": " << io::endl;
//
log << "\t\t\tAccess (" << accs[i] << ") is ";
//
}
if
(
logFor
(
LOG_BLOCK
))
{
log
<<
"
\t\t
Function "
<<
b
->
cfg
()
->
label
()
<<
", "
;
log
<<
const_cast
<
Block
*>
(
b
)
<<
": "
<<
io
::
endl
;
log
<<
"
\t\t\t
Access ("
<<
accs
[
i
]
<<
") is "
;
}
if
(
man
.
alwaysHit
())
{
HIT_CATEGORY
(
accs
[
i
])
=
HitCategory
::
AH
;
//
if(logFor(LOG_BLOCK))
//
log << "AH" << elm::io::endl;
if
(
logFor
(
LOG_BLOCK
))
log
<<
"AH"
<<
elm
::
io
::
endl
;
}
else
{
HIT_CATEGORY
(
accs
[
i
])
=
HitCategory
::
NC
;
//
if(logFor(LOG_BLOCK))
//
log << "NC" << elm::io::endl;
if
(
logFor
(
LOG_BLOCK
))
log
<<
"NC"
<<
elm
::
io
::
endl
;
}
}
man
.
update
(
accs
[
i
]);
...
...
Write
Preview
Markdown
is supported
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