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
07921708
Commit
07921708
authored
2 months ago
by
Xavier Routh
Browse files
Options
Downloads
Patches
Plain Diff
loop canon bound fix
parent
8dabbb84
No related branches found
No related tags found
1 merge request
!188
Loop canon bound fix
Pipeline
#201747
passed
2 months ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hercules_opt/src/loop_bound_canon.rs
+14
-10
14 additions, 10 deletions
hercules_opt/src/loop_bound_canon.rs
juno_samples/cava/src/cpu.sch
+1
-0
1 addition, 0 deletions
juno_samples/cava/src/cpu.sch
juno_samples/fork_join_tests/src/cpu.sch
+2
-7
2 additions, 7 deletions
juno_samples/fork_join_tests/src/cpu.sch
with
17 additions
and
17 deletions
hercules_opt/src/loop_bound_canon.rs
+
14
−
10
View file @
07921708
...
...
@@ -270,17 +270,20 @@ pub fn canonicalize_single_loop_bounds(
edit
.replace_all_uses_where
(
bound_id
,
new_condition
,
|
usee
|
*
usee
==
binop_node
)
?
;
}
// Add back to uses of the IV
for
user
in
update_expr_users
{
let
new_user
=
Node
::
Binary
{
left
:
user
,
right
:
*
initializer
,
op
:
BinaryOperator
::
Add
,
};
let
new_user
=
edit
.add_node
(
new_user
);
edit
=
edit
.replace_all_uses
(
user
,
new_user
)
?
;
}
// for user in update_expr_users {
// let new_user = Node::Binary {
// left: user,
// right: *initializer,
// op: BinaryOperator::Add,
// };
// let new_user = edit.add_node(new_user);
// edit = edit.replace_all_uses(user, new_user)?;
// }
// for
// Add the offset back to users of the IV update expression
let
new_user
=
Node
::
Binary
{
left
:
*
update_expression
,
right
:
*
initializer
,
...
...
@@ -294,6 +297,7 @@ pub fn canonicalize_single_loop_bounds(
&&
*
usee
!=
condition_node
})
?
;
// Add the offset back to users of the IV directly
let
new_user
=
Node
::
Binary
{
left
:
*
iv_phi
,
right
:
*
initializer
,
...
...
This diff is collapsed.
Click to expand it.
juno_samples/cava/src/cpu.sch
+
1
−
0
View file @
07921708
...
...
@@ -38,6 +38,7 @@ fixpoint {
}
simpl!(fuse1);
array-slf(fuse1);
loop-bound-canon(fuse1);
inline(fuse2);
no-memset(fuse2@res);
...
...
This diff is collapsed.
Click to expand it.
juno_samples/fork_join_tests/src/cpu.sch
+
2
−
7
View file @
07921708
...
...
@@ -25,11 +25,8 @@ gvn(*);
phi-elim(*);
dce(*);
xdot[true](auto.test2);
lift-dc-math(auto.test2);
xdot[true](auto.test2);
loop-bound-canon(auto.test2);
xdot[true](auto.test2);
lift-dc-math(*);
loop-bound-canon(*);
fixpoint panic after 20 {
forkify(*);
...
...
@@ -38,8 +35,6 @@ fixpoint panic after 20 {
dce(*);
}
xdot[true](auto.test2);
dce(*);
gvn(*);
...
...
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