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
17865bcb
Commit
17865bcb
authored
5 months ago
by
Aaron Councilman
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into sroa
parents
0bcdf930
82edc984
No related branches found
No related tags found
1 merge request
!57
Intraprocedural SROA
Pipeline
#200322
passed
5 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hercules_ir/src/typecheck.rs
+5
-12
5 additions, 12 deletions
hercules_ir/src/typecheck.rs
with
5 additions
and
12 deletions
hercules_ir/src/typecheck.rs
+
5
−
12
View file @
17865bcb
...
@@ -688,26 +688,19 @@ fn typeflow(
...
@@ -688,26 +688,19 @@ fn typeflow(
return
Error
(
String
::
from
(
"Ternary node must have exactly three inputs."
));
return
Error
(
String
::
from
(
"Ternary node must have exactly three inputs."
));
}
}
if
let
Concrete
(
id
)
=
inputs
[
0
]
{
match
op
{
match
op
{
TernaryOperator
::
Select
=>
{
TernaryOperator
::
Select
=>
{
if
let
Concrete
(
id
)
=
inputs
[
0
]
{
if
!
types
[
id
.idx
()]
.is_bool
()
{
if
!
types
[
id
.idx
()]
.is_bool
()
{
return
Error
(
String
::
from
(
return
Error
(
String
::
from
(
"Select ternary node input cannot have non-bool condition input."
,
"Select ternary node input cannot have non-bool condition input."
,
));
));
}
}
let
data_ty
=
TypeSemilattice
::
meet
(
inputs
[
1
],
inputs
[
2
]);
if
let
Concrete
(
data_id
)
=
data_ty
{
return
Concrete
(
data_id
);
}
else
{
return
data_ty
;
}
}
}
TypeSemilattice
::
meet
(
inputs
[
1
],
inputs
[
2
])
}
}
}
}
Error
(
String
::
from
(
"Unhandled ternary types."
))
}
}
Node
::
Call
{
Node
::
Call
{
control
:
_
,
control
:
_
,
...
...
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