Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
06a573f6
Commit
06a573f6
authored
21 years ago
by
Chris Lattner
Browse files
Options
Downloads
Patches
Plain Diff
Only clone global nodes between graphs if both graphs have the global.
llvm-svn: 11928
parent
98f8ca40
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
+3
-0
3 additions, 0 deletions
llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
llvm/lib/Analysis/DataStructure/DataStructure.cpp
+6
-13
6 additions, 13 deletions
llvm/lib/Analysis/DataStructure/DataStructure.cpp
with
9 additions
and
13 deletions
llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp
+
3
−
0
View file @
06a573f6
...
@@ -279,6 +279,9 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
...
@@ -279,6 +279,9 @@ void BUDataStructures::calculateGraph(DSGraph &Graph) {
//
//
DSGraph
&
GI
=
getDSGraph
(
*
Callee
);
// Graph to inline
DSGraph
&
GI
=
getDSGraph
(
*
Callee
);
// Graph to inline
if
(
Callee
->
getName
()
==
"bc_raise"
)
std
::
cerr
<<
"HERE!
\n
"
;
DEBUG
(
std
::
cerr
<<
" Inlining graph for "
<<
Callee
->
getName
()
DEBUG
(
std
::
cerr
<<
" Inlining graph for "
<<
Callee
->
getName
()
<<
"["
<<
GI
.
getGraphSize
()
<<
"+"
<<
"["
<<
GI
.
getGraphSize
()
<<
"+"
<<
GI
.
getAuxFunctionCalls
().
size
()
<<
"] into '"
<<
GI
.
getAuxFunctionCalls
().
size
()
<<
"] into '"
...
...
This diff is collapsed.
Click to expand it.
llvm/lib/Analysis/DataStructure/DataStructure.cpp
+
6
−
13
View file @
06a573f6
...
@@ -33,10 +33,6 @@ namespace {
...
@@ -33,10 +33,6 @@ namespace {
Statistic
<>
NumDNE
(
"dsa"
,
"Number of nodes removed by reachability"
);
Statistic
<>
NumDNE
(
"dsa"
,
"Number of nodes removed by reachability"
);
Statistic
<>
NumTrivialDNE
(
"dsa"
,
"Number of nodes trivially removed"
);
Statistic
<>
NumTrivialDNE
(
"dsa"
,
"Number of nodes trivially removed"
);
Statistic
<>
NumTrivialGlobalDNE
(
"dsa"
,
"Number of globals trivially removed"
);
Statistic
<>
NumTrivialGlobalDNE
(
"dsa"
,
"Number of globals trivially removed"
);
cl
::
opt
<
bool
>
EnableDSNodeGlobalRootsHack
(
"enable-dsa-globalrootshack"
,
cl
::
Hidden
,
cl
::
desc
(
"Make DSA less aggressive when cloning graphs"
));
};
};
#if 1
#if 1
...
@@ -1239,15 +1235,12 @@ void DSGraph::mergeInGraph(const DSCallSite &CS, Function &F,
...
@@ -1239,15 +1235,12 @@ void DSGraph::mergeInGraph(const DSCallSite &CS, Function &F,
AuxFunctionCalls
.
push_back
(
DSCallSite
(
Graph
.
AuxFunctionCalls
[
i
],
RC
));
AuxFunctionCalls
.
push_back
(
DSCallSite
(
Graph
.
AuxFunctionCalls
[
i
],
RC
));
}
}
// If the user requested it, add the nodes that we need to clone to the
// Clone over all globals that appear in the caller and callee graphs.
// RootNodes set.
for
(
DSScalarMap
::
global_iterator
GI
=
Graph
.
getScalarMap
().
global_begin
(),
if
(
!
EnableDSNodeGlobalRootsHack
)
E
=
Graph
.
getScalarMap
().
global_end
();
GI
!=
E
;
++
GI
)
// FIXME: Why is this not iterating over the globals in the graph??
if
(
GlobalVariable
*
GV
=
dyn_cast
<
GlobalVariable
>
(
*
GI
))
for
(
node_iterator
NI
=
Graph
.
node_begin
(),
E
=
Graph
.
node_end
();
if
(
ScalarMap
.
count
(
GV
))
NI
!=
E
;
++
NI
)
RC
.
merge
(
ScalarMap
[
GV
],
Graph
.
getNodeForValue
(
GV
));
if
(
!
(
*
NI
)
->
getGlobals
().
empty
())
RC
.
getClonedNH
(
*
NI
);
}
else
{
}
else
{
DSNodeHandle
RetVal
=
getReturnNodeFor
(
F
);
DSNodeHandle
RetVal
=
getReturnNodeFor
(
F
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment