Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hercules
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
llvm
Hercules
Commits
513c6f7d
Commit
513c6f7d
authored
1 year ago
by
Russel Arbore
Browse files
Options
Downloads
Patches
Plain Diff
cleanup forkify, fix loop_false_read deletion
parent
56777804
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
hercules_opt/src/forkify.rs
+6
-6
6 additions, 6 deletions
hercules_opt/src/forkify.rs
with
6 additions
and
6 deletions
hercules_opt/src/forkify.rs
+
6
−
6
View file @
513c6f7d
...
@@ -154,9 +154,6 @@ pub fn forkify(
...
@@ -154,9 +154,6 @@ pub fn forkify(
let
join_id
=
NodeID
::
new
(
function
.nodes
.len
());
let
join_id
=
NodeID
::
new
(
function
.nodes
.len
());
function
.nodes
.push
(
join
);
function
.nodes
.push
(
join
);
// Reconnect control nodes.
get_uses_mut
(
&
mut
function
.nodes
[
loop_dst
.idx
()])
.map
(
loop_false_read
,
join_id
);
// Convert reducing phi nodes to reduce nodes.
// Convert reducing phi nodes to reduce nodes.
let
reduction_phis
:
Vec
<
_
>
=
def_use
let
reduction_phis
:
Vec
<
_
>
=
def_use
.get_users
(
header
)
.get_users
(
header
)
...
@@ -219,15 +216,18 @@ pub fn forkify(
...
@@ -219,15 +216,18 @@ pub fn forkify(
let
thread_id
=
Node
::
ThreadID
{
control
:
fork_id
};
let
thread_id
=
Node
::
ThreadID
{
control
:
fork_id
};
let
thread_id_id
=
NodeID
::
new
(
function
.nodes
.len
());
let
thread_id_id
=
NodeID
::
new
(
function
.nodes
.len
());
function
.nodes
.push
(
thread_id
);
function
.nodes
.push
(
thread_id
);
for
user
in
def_use
.get_users
(
idx_phi
)
{
for
user
in
def_use
.get_users
(
idx_phi
)
{
get_uses_mut
(
&
mut
function
.nodes
[
user
.idx
()])
.map
(
idx_phi
,
thread_id_id
);
get_uses_mut
(
&
mut
function
.nodes
[
user
.idx
()])
.map
(
idx_phi
,
thread_id_id
);
}
}
function
.nodes
[
idx_phi
.idx
()]
=
Node
::
Start
;
// Delete old loop control nodes;
for
user
in
def_use
.get_users
(
header
)
{
for
user
in
def_use
.get_users
(
header
)
{
get_uses_mut
(
&
mut
function
.nodes
[
user
.idx
()])
.map
(
header
,
fork_id
);
get_uses_mut
(
&
mut
function
.nodes
[
user
.idx
()])
.map
(
header
,
fork_id
);
}
}
for
user
in
def_use
.get_users
(
loop_false_read
)
{
get_uses_mut
(
&
mut
function
.nodes
[
user
.idx
()])
.map
(
loop_false_read
,
join_id
);
}
function
.nodes
[
idx_phi
.idx
()]
=
Node
::
Start
;
function
.nodes
[
header
.idx
()]
=
Node
::
Start
;
function
.nodes
[
header
.idx
()]
=
Node
::
Start
;
function
.nodes
[
loop_end
.idx
()]
=
Node
::
Start
;
function
.nodes
[
loop_end
.idx
()]
=
Node
::
Start
;
function
.nodes
[
loop_true_read
.idx
()]
=
Node
::
Start
;
function
.nodes
[
loop_true_read
.idx
()]
=
Node
::
Start
;
...
...
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