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
e81c2aa4
Commit
e81c2aa4
authored
20 years ago
by
Chris Lattner
Browse files
Options
Downloads
Patches
Plain Diff
Implement new changeFunction method, nuke a never implemented one.
llvm-svn: 16386
parent
db981ab5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/Analysis/IPA/CallGraph.cpp
+14
-8
14 additions, 8 deletions
llvm/lib/Analysis/IPA/CallGraph.cpp
with
14 additions
and
8 deletions
llvm/lib/Analysis/IPA/CallGraph.cpp
+
14
−
8
View file @
e81c2aa4
...
@@ -163,14 +163,6 @@ void CallGraph::dump() const {
...
@@ -163,14 +163,6 @@ void CallGraph::dump() const {
// Implementations of public modification methods
// Implementations of public modification methods
//
//
// Functions to keep a call graph up to date with a function that has been
// modified
//
void
CallGraph
::
addFunctionToModule
(
Function
*
F
)
{
assert
(
0
&&
"not implemented"
);
abort
();
}
// removeFunctionFromModule - Unlink the function from this module, returning
// removeFunctionFromModule - Unlink the function from this module, returning
// it. Because this removes the function from the module, the call graph node
// it. Because this removes the function from the module, the call graph node
// is destroyed. This is only valid if the function does not call any other
// is destroyed. This is only valid if the function does not call any other
...
@@ -188,6 +180,20 @@ Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) {
...
@@ -188,6 +180,20 @@ Function *CallGraph::removeFunctionFromModule(CallGraphNode *CGN) {
return
F
;
return
F
;
}
}
// changeFunction - This method changes the function associated with this
// CallGraphNode, for use by transformations that need to change the prototype
// of a Function (thus they must create a new Function and move the old code
// over).
void
CallGraph
::
changeFunction
(
Function
*
OldF
,
Function
*
NewF
)
{
iterator
I
=
FunctionMap
.
find
(
OldF
);
CallGraphNode
*&
New
=
FunctionMap
[
NewF
];
assert
(
I
!=
FunctionMap
.
end
()
&&
I
->
second
&&
!
New
&&
"OldF didn't exist in CG or NewF already does!"
);
New
=
I
->
second
;
FunctionMap
.
erase
(
I
);
}
void
CallGraph
::
stub
()
{}
void
CallGraph
::
stub
()
{}
void
CallGraphNode
::
removeCallEdgeTo
(
CallGraphNode
*
Callee
)
{
void
CallGraphNode
::
removeCallEdgeTo
(
CallGraphNode
*
Callee
)
{
...
...
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