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
!25
Misc. improvements
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Misc. improvements
misc
into
main
Overview
0
Commits
21
Pipelines
0
Changes
1
Merged
rarbore2
requested to merge
misc
into
main
10 months ago
Overview
0
Commits
21
Pipelines
0
Changes
1
Expand
Emit non-zero array constants properly
Emit only actually used array constants per runtime wrapper
Juno CLI
Use repr(C) structs for product types
Minimal implementation of SROA
TODO: inlining, codegen cast, intrinsics, dynamic constant math
Edited
10 months ago
by
rarbore2
0
0
Merge request reports
Viewing commit
6c8dca75
Prev
Next
Show latest version
1 file
+
3
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6c8dca75
update comment
· 6c8dca75
Russel Arbore
authored
10 months ago
hercules_opt/src/sroa.rs
+
3
−
1
Options
@@ -180,7 +180,9 @@ pub fn sroa(
@@ -180,7 +180,9 @@ pub fn sroa(
.collect
();
.collect
();
println!
(
"{:?}"
,
to_sroa
);
println!
(
"{:?}"
,
to_sroa
);
// Perform SROA.
// Perform SROA. TODO: repair def-use when there are multiple product
// constants to SROA away.
assert!
(
to_sroa
.len
()
<
2
);
for
(
constant_node_id
,
constant_id
)
in
to_sroa
{
for
(
constant_node_id
,
constant_id
)
in
to_sroa
{
// Get the field constants to replace the product constant with.
// Get the field constants to replace the product constant with.
let
product_constant
=
constants
[
constant_id
.idx
()]
.clone
();
let
product_constant
=
constants
[
constant_id
.idx
()]
.clone
();
Loading