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
bb97db3d
Commit
bb97db3d
authored
11 years ago
by
Preston Briggs
Browse files
Options
Downloads
Patches
Plain Diff
extending the interface of Dependence slightly to support future work
llvm-svn: 185241
parent
5c47650f
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/include/llvm/Analysis/DependenceAnalysis.h
+35
-1
35 additions, 1 deletion
llvm/include/llvm/Analysis/DependenceAnalysis.h
with
35 additions
and
1 deletion
llvm/include/llvm/Analysis/DependenceAnalysis.h
+
35
−
1
View file @
bb97db3d
...
@@ -61,11 +61,20 @@ namespace llvm {
...
@@ -61,11 +61,20 @@ namespace llvm {
/// cases (for output, flow, and anti dependences), the dependence implies
/// cases (for output, flow, and anti dependences), the dependence implies
/// an ordering, where the source must precede the destination; in contrast,
/// an ordering, where the source must precede the destination; in contrast,
/// input dependences are unordered.
/// input dependences are unordered.
///
/// When a dependence graph is built, each Dependence will be a member of
/// the set of predecessor edges for its destination instruction and a set
/// if successor edges for its source instruction. These sets are represented
/// as singly-linked lists, with the "next" fields stored in the dependence
/// itelf.
class
Dependence
{
class
Dependence
{
public:
public:
Dependence
(
Instruction
*
Source
,
Dependence
(
Instruction
*
Source
,
Instruction
*
Destination
)
:
Instruction
*
Destination
)
:
Src
(
Source
),
Dst
(
Destination
)
{}
Src
(
Source
),
Dst
(
Destination
),
NextPredecessor
(
NULL
),
NextSuccessor
(
NULL
)
{}
virtual
~
Dependence
()
{}
virtual
~
Dependence
()
{}
/// Dependence::DVEntry - Each level in the distance/direction vector
/// Dependence::DVEntry - Each level in the distance/direction vector
...
@@ -164,11 +173,36 @@ namespace llvm {
...
@@ -164,11 +173,36 @@ namespace llvm {
/// variable associated with the loop at this level.
/// variable associated with the loop at this level.
virtual
bool
isScalar
(
unsigned
Level
)
const
;
virtual
bool
isScalar
(
unsigned
Level
)
const
;
/// getNextPredecessor - Returns the value of the NextPredecessor
/// field.
const
Dependence
*
getNextPredecessor
()
const
{
return
NextPredecessor
;
}
/// getNextSuccessor - Returns the value of the NextSuccessor
/// field.
const
Dependence
*
getNextSuccessor
()
const
{
return
NextSuccessor
;
}
/// setNextPredecessor - Sets the value of the NextPredecessor
/// field.
void
setNextPredecessor
(
const
Dependence
*
pred
)
{
NextPredecessor
=
pred
;
}
/// setNextSuccessor - Sets the value of the NextSuccessor
/// field.
void
setNextSuccessor
(
const
Dependence
*
succ
)
{
NextSuccessor
=
succ
;
}
/// dump - For debugging purposes, dumps a dependence to OS.
/// dump - For debugging purposes, dumps a dependence to OS.
///
///
void
dump
(
raw_ostream
&
OS
)
const
;
void
dump
(
raw_ostream
&
OS
)
const
;
private
:
private
:
Instruction
*
Src
,
*
Dst
;
Instruction
*
Src
,
*
Dst
;
const
Dependence
*
NextPredecessor
,
*
NextSuccessor
;
friend
class
DependenceAnalysis
;
friend
class
DependenceAnalysis
;
};
};
...
...
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