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
Merge requests
!154
Fix issue
#21
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix issue
#21
fix_antideps
into
main
Overview
0
Commits
1
Pipelines
1
Changes
4
Merged
rarbore2
requested to merge
fix_antideps
into
main
3 months ago
Overview
0
Commits
1
Pipelines
1
Changes
4
Expand
Fixes GCM when anti-dependencies thinks there needs to be an edge from a read to a write that the read doesn't dominate - just don't draw that edge (not necessary since anti-dependencies can be treated as best effort).
Closes
#21 (closed)
.
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
ca17e8f1
1 commit,
3 months ago
4 files
+
39
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
hercules_opt/src/gcm.rs
+
7
−
0
Options
@@ -324,6 +324,12 @@ fn basic_blocks(
@@ -324,6 +324,12 @@ fn basic_blocks(
// 3: If the node producing the collection is a reduce node, then any read
// 3: If the node producing the collection is a reduce node, then any read
// users that aren't in the reduce's cycle shouldn't anti-depend user any
// users that aren't in the reduce's cycle shouldn't anti-depend user any
// mutators in the reduce cycle.
// mutators in the reduce cycle.
//
// Because we do a liveness analysis based spill of collections, anti-
// dependencies can be best effort. Thus, when we encounter a read and
// mutator where the read doesn't dominate the mutator, but an anti-depdence
// edge is derived for the pair, we just don't draw the edge since it would
// break the scheduler.
let
mut
antideps
=
BTreeSet
::
new
();
let
mut
antideps
=
BTreeSet
::
new
();
for
id
in
reverse_postorder
.iter
()
{
for
id
in
reverse_postorder
.iter
()
{
// Find a terminating read node and the collections it reads.
// Find a terminating read node and the collections it reads.
@@ -385,6 +391,7 @@ fn basic_blocks(
@@ -385,6 +391,7 @@ fn basic_blocks(
.get
(
root
)
.get
(
root
)
.map
(|
cycle
|
cycle
.contains
(
mutator
))
.map
(|
cycle
|
cycle
.contains
(
mutator
))
.unwrap_or
(
false
))
.unwrap_or
(
false
))
&&
dom
.does_dom
(
schedule_early
[
id
.idx
()]
.unwrap
(),
mutator_early
)
{
{
antideps
.insert
((
*
id
,
*
mutator
));
antideps
.insert
((
*
id
,
*
mutator
));
}
}
Loading