Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LLVM bpEVL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Lorenzo Albano
LLVM bpEVL
Commits
1028ac46
Commit
1028ac46
authored
22 years ago
by
Misha Brukman
Browse files
Options
Downloads
Patches
Plain Diff
'graph' is spelled without a 'c'.
Also added Statistic counters for NoAlias and MayAlias. llvm-svn: 4972
parent
c1ba0cdd
No related branches found
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/DataStructure/Steensgaard.cpp
+12
-3
12 additions, 3 deletions
llvm/lib/Analysis/DataStructure/Steensgaard.cpp
with
12 additions
and
3 deletions
llvm/lib/Analysis/DataStructure/Steensgaard.cpp
+
12
−
3
View file @
1028ac46
...
@@ -13,6 +13,11 @@
...
@@ -13,6 +13,11 @@
#include
"llvm/Module.h"
#include
"llvm/Module.h"
#include
"Support/Statistic.h"
#include
"Support/Statistic.h"
namespace
{
Statistic
<>
NumNoAlias
(
"steens"
,
"Number of 'no alias' replies"
);
Statistic
<>
NumMayAlias
(
"steens"
,
"Number of 'may alias' replies"
);
};
namespace
{
namespace
{
class
Steens
:
public
Pass
,
public
AliasAnalysis
{
class
Steens
:
public
Pass
,
public
AliasAnalysis
{
DSGraph
*
ResultGraph
;
DSGraph
*
ResultGraph
;
...
@@ -202,7 +207,7 @@ bool Steens::run(Module &M) {
...
@@ -202,7 +207,7 @@ bool Steens::run(Module &M) {
// alias - This is the only method here that does anything interesting...
// alias - This is the only method here that does anything interesting...
AliasAnalysis
::
Result
Steens
::
alias
(
const
Value
*
V1
,
const
Value
*
V2
)
{
AliasAnalysis
::
Result
Steens
::
alias
(
const
Value
*
V1
,
const
Value
*
V2
)
{
assert
(
ResultGraph
&&
"Result gr
c
aph has not
yet
been computed!"
);
assert
(
ResultGraph
&&
"Result graph has not been computed
yet
!"
);
std
::
map
<
Value
*
,
DSNodeHandle
>
&
GVM
=
ResultGraph
->
getScalarMap
();
std
::
map
<
Value
*
,
DSNodeHandle
>
&
GVM
=
ResultGraph
->
getScalarMap
();
...
@@ -214,9 +219,10 @@ AliasAnalysis::Result Steens::alias(const Value *V1, const Value *V2) {
...
@@ -214,9 +219,10 @@ AliasAnalysis::Result Steens::alias(const Value *V1, const Value *V2) {
DSNodeHandle
&
V2H
=
J
->
second
;
DSNodeHandle
&
V2H
=
J
->
second
;
// If the two pointers point to different data structure graph nodes, they
// If the two pointers point to different data structure graph nodes, they
// cannot alias!
// cannot alias!
if
(
V1H
.
getNode
()
!=
V2H
.
getNode
())
if
(
V1H
.
getNode
()
!=
V2H
.
getNode
())
{
++
NumNoAlias
;
return
NoAlias
;
return
NoAlias
;
}
// FIXME: If the two pointers point to the same node, and the offsets are
// FIXME: If the two pointers point to the same node, and the offsets are
// different, and the LinkIndex vector doesn't alias the section, then the
// different, and the LinkIndex vector doesn't alias the section, then the
// two pointers do not alias. We need access size information for the two
// two pointers do not alias. We need access size information for the two
...
@@ -225,6 +231,9 @@ AliasAnalysis::Result Steens::alias(const Value *V1, const Value *V2) {
...
@@ -225,6 +231,9 @@ AliasAnalysis::Result Steens::alias(const Value *V1, const Value *V2) {
}
}
}
}
// Since Steensgaard cannot do any better, count it as a 'may alias'
++
NumMayAlias
;
// If we cannot determine alias properties based on our graph, fall back on
// If we cannot determine alias properties based on our graph, fall back on
// some other AA implementation.
// some other AA implementation.
//
//
...
...
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