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
!144
Forkify fixes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Forkify fixes
forkify-fixes
into
main
Overview
2
Commits
31
Pipelines
6
Changes
6
1 unresolved thread
Hide all comments
Merged
Xavier Routh
requested to merge
forkify-fixes
into
main
1 month ago
Overview
2
Commits
31
Pipelines
6
Changes
6
1 unresolved thread
Hide all comments
Expand
0
0
Merge request reports
Viewing commit
d1be038f
Prev
Next
Show latest version
6 files
+
46
−
23
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
d1be038f
Merge branch 'main' into forkify-fixes
· d1be038f
Russel Arbore
authored
1 month ago
hercules_ir/src/collections.rs
+
2
−
14
Options
use
std
::
collections
::{
BTreeMap
,
BTreeSet
,
HashMap
};
use
std
::
collections
::{
BTreeMap
,
BTreeSet
,
HashMap
,
HashSet
};
use
std
::
iter
::{
once
,
repeat
,
zip
};
use
either
::
Either
;
@@ -432,20 +432,8 @@ pub fn no_reset_constant_collections(
init
:
_
,
reduct
:
_
,
}
=>
{
// If the einsum for this reduce node is a full array
// comprehension, then every array element is written to, and
// the empty indices set (the whole collection) is considered as
// written to.
let
(
env
,
exprs
)
=
reduce_einsum
;
if
let
Some
(
expr
)
=
exprs
.get
(
&
id
)
&&
let
MathExpr
::
Comprehension
(
_
,
_
)
=
env
[
expr
.idx
()]
{
ZeroLattice
::
top
()
}
// Otherwise, meet the `init` and `reduct` inputs.
else
{
ZeroLattice
::
meet
(
&
inputs
[
0
],
&
inputs
[
1
])
}
ZeroLattice
::
meet
(
&
inputs
[
0
],
&
inputs
[
1
])
}
Node
::
Write
{
collect
:
_
,
Loading