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
d39e899d
"...git@gitlab.engr.illinois.edu:llvm/hpvm-release.git" did not exist on "9c11c880334e78add522d043bbe2bc083f6182b5"
Commit
d39e899d
authored
5 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
Reverting createNode indexing in Fusion Pass
parent
d471c29e
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/Transforms/FuseHPVMTensorNodes/FuseHPVMTensorNodes.cpp
+16
-16
16 additions, 16 deletions
...ib/Transforms/FuseHPVMTensorNodes/FuseHPVMTensorNodes.cpp
with
16 additions
and
16 deletions
llvm/lib/Transforms/FuseHPVMTensorNodes/FuseHPVMTensorNodes.cpp
+
16
−
16
View file @
d39e899d
...
...
@@ -157,8 +157,8 @@ IntrinsicInst* FuseHPVMTensorNodes::createIdenticalBindWithDifferentPort(
void
FuseHPVMTensorNodes
::
createArgTypes
(
IntrinsicInst
*
II1
,
IntrinsicInst
*
II2
,
std
::
vector
<
Type
*>
&
ArgTypes
)
{
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
// Arguments of the first node are simply added
for
(
auto
&
arg
:
F1
->
getArgumentList
())
{
...
...
@@ -193,8 +193,8 @@ void FuseHPVMTensorNodes::createArgTypes(IntrinsicInst* II1,
/* Get the return type of the function for fused node II1-II2 */
StructType
*
FuseHPVMTensorNodes
::
createReturnType
(
IntrinsicInst
*
II1
,
IntrinsicInst
*
II2
)
{
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
// Based on the HPVM tensor node assumptions and the patterns we want to
// support, when two nodes are fused the result will always be the result
...
...
@@ -211,8 +211,8 @@ StructType* FuseHPVMTensorNodes::createReturnType(IntrinsicInst* II1,
void
FuseHPVMTensorNodes
::
copyArgumentNames
(
IntrinsicInst
*
II1
,
IntrinsicInst
*
II2
,
Function
*
F
)
{
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
::
arg_iterator
dest_it
=
F
->
arg_begin
();
...
...
@@ -254,8 +254,8 @@ void FuseHPVMTensorNodes::copyArgumentNames(IntrinsicInst* II1,
void
FuseHPVMTensorNodes
::
copyAttrList
(
IntrinsicInst
*
II1
,
IntrinsicInst
*
II2
,
Function
*
F
)
{
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
::
arg_iterator
f1_ai
=
F1
->
arg_begin
(),
f1_ae
=
F1
->
arg_end
();
Function
::
arg_iterator
f2_ai
=
F2
->
arg_begin
(),
f2_ae
=
F2
->
arg_end
();
...
...
@@ -306,8 +306,8 @@ void FuseHPVMTensorNodes::copyAttrList(IntrinsicInst* II1,
Function
*
FuseHPVMTensorNodes
::
createEmptyDFNodeFunction
(
IntrinsicInst
*
II1
,
IntrinsicInst
*
II2
,
Module
&
M
)
{
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
DEBUG
(
errs
()
<<
"Constructing argument list
\n
"
);
// Construct argument list
...
...
@@ -487,8 +487,8 @@ Function* FuseHPVMTensorNodes::createLeafDFNodeFunction(IntrinsicInst* II1,
ReturnInst
::
Create
(
M
.
getContext
(),
UndefValue
::
get
(
FfusedRetTy
),
BB
);
// Get the node functions
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
// Initially, update FusedValueMap: it is populated with the arguments of F1
Function
::
arg_iterator
fused_arg_it
=
Ffused
->
arg_begin
();
...
...
@@ -541,8 +541,8 @@ void FuseHPVMTensorNodes::updateParentNodeFunction(IntrinsicInst* II1,
// Compute the required shifting of positions for edges/binds to the second
// fusion node. No shifting is required for the first fusion node.
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
std
::
vector
<
unsigned
>
ShiftMap
(
F2
->
getFunctionType
()
->
getNumParams
(),
0
);
unsigned
shiftCount
=
F1
->
getFunctionType
()
->
getNumParams
();
...
...
@@ -675,8 +675,8 @@ IntrinsicInst* FuseHPVMTensorNodes::FuseHPVMTensorNodesStep(IntrinsicInst* II1,
IntrinsicInst
*
II2
,
Module
&
M
)
{
// Get the node functions
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
1
))
->
stripPointerCasts
());
Function
*
F1
=
cast
<
Function
>
((
II1
->
getOperand
(
0
))
->
stripPointerCasts
());
Function
*
F2
=
cast
<
Function
>
((
II2
->
getOperand
(
0
))
->
stripPointerCasts
());
// Create fused node function
Function
*
Ffused
=
createLeafDFNodeFunction
(
II1
,
II2
,
M
);
...
...
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