Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
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
Model registry
Operate
Environments
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
llvm
hpvm-release
Commits
358452be
Commit
358452be
authored
11 years ago
by
kotsifa2
Browse files
Options
Downloads
Patches
Plain Diff
Added DFEdge class
parent
2a561909
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/include/llvm/IR/DFGraph.h
+94
-0
94 additions, 0 deletions
llvm/include/llvm/IR/DFGraph.h
with
94 additions
and
0 deletions
llvm/include/llvm/IR/DF
Node
.h
→
llvm/include/llvm/IR/DF
Graph
.h
+
94
−
0
View file @
358452be
//===-- llvm/IR/DF
Node
.h - Class to represent a
single
Dataflow
Node
--===//
//===--
---
llvm/IR/DF
Graph
.h - Class
es
to represent a Dataflow
Graph ----
--===//
//
//
// The LLVM Compiler Infrastructure
// The LLVM Compiler Infrastructure
//
//
...
@@ -7,8 +7,9 @@
...
@@ -7,8 +7,9 @@
//
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
//
//
// This file contains the declaration of the DFNode class, which represents a
// This file contains the declaration of the DFNode and DFEdge class.
// single VISC Dataflow Node in LLVM.
//
// DFNode represents a single VISC Dataflow Node in LLVM.
//
//
// A Dataflow Node basically consists of
// A Dataflow Node basically consists of
// 1. Pointer to a function describing this dataflow node
// 1. Pointer to a function describing this dataflow node
...
@@ -18,10 +19,23 @@
...
@@ -18,10 +19,23 @@
// 5. List of children Dataflow Nodes (empty if it is a leaf node)
// 5. List of children Dataflow Nodes (empty if it is a leaf node)
// 6. List of Dataflow Edges among children
// 6. List of Dataflow Edges among children
//
//
// DFEdge represents a single VISC Dataflow Edge in LLVM.
//
// A Dataflow Edge basically consists of
// 1. Pointer to the dataflow node that is the source of this edge
// 2. Pointer to the dataflow node that is the destination of this edge
// 3. Pointer to a function that describes which instances of the source
// dataflow node are connected to which instances of the destination
// dataflow node via this edge
// 4. Pointer to a function that describes which input arguments of the
// destination dataflow node are connected to which outputs of the source
// dataflow node via this edge
//
// FIXME : We still need to figure out whether these functions are independent
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
#ifndef LLVM_IR_DF
NODE
_H
#ifndef LLVM_IR_DF
GRAPH
_H
#define LLVM_IR_DF
NODE
_H
#define LLVM_IR_DF
GRAPH
_H
#include
"llvm/IR/Function.h"
#include
"llvm/IR/Function.h"
#include
"llvm/Support/Compiler.h"
#include
"llvm/Support/Compiler.h"
...
@@ -29,10 +43,11 @@
...
@@ -29,10 +43,11 @@
namespace
llvm
{
namespace
llvm
{
class
DFNode
:
public
ilist_node
<
DFNode
>
{
class
DFNode
:
public
ilist_node
<
DFNode
>
{
p
ublic
:
p
rivate
:
typedef
iplist
<
DFNode
>
DFNodeListType
;
typedef
iplist
<
DFNode
>
DFNodeListType
;
typedef
iplist
<
DFEdge
>
DFEdgeListType
;
typedef
iplist
<
DFEdge
>
DFEdgeListType
;
public:
// DFNode and DFEdge iterators
// DFNode and DFEdge iterators
typedef
DFNodeListType
::
iterator
iterator
;
typedef
DFNodeListType
::
iterator
iterator
;
typedef
DFNodeListType
::
const_iterator
const_iterator
;
typedef
DFNodeListType
::
const_iterator
const_iterator
;
...
@@ -55,6 +70,25 @@ public:
...
@@ -55,6 +70,25 @@ public:
}
}
};
};
class
DFEdge
:
public
ilist_node
<
DFEdge
>
{
private:
// Important things that make up a Dataflow Edge
DFNode
*
SrcDF
;
///< Pointer to source dataflow Node
DFNode
*
DestDF
;
///< Pointer to destination dataflow Node
Function
*
DFMapFuncPointer
;
///< Function that associates the appropriate
///< instances of source and destination
///< dataflow nodes
Function
*
ArgMapFuncPointer
;
///< Function that associates the input
///< arguments of destination with the outputs
///< of source dataflow node
public:
static
DFEdge
*
Create
(
DFNode
*
SrcDF
,
DFNode
*
DestDF
,
Function
*
DFMapFuncPointer
,
Function
*
ArgMapFuncPointer
)
{
return
new
DFEdge
(
SrcDF
,
DestDF
,
DFMapFuncPointer
,
ArgMapFuncPointer
);
}
};
}
// End llvm namespace
}
// End llvm namespace
#endif
#endif
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