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
97c4bbcf
Commit
97c4bbcf
authored
4 months ago
by
Aaron Councilman
Browse files
Options
Downloads
Patches
Plain Diff
Formatting
parent
17865bcb
No related branches found
No related tags found
1 merge request
!57
Intraprocedural SROA
Pipeline
#200323
passed
4 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hercules_opt/src/sroa.rs
+4
-5
4 additions, 5 deletions
hercules_opt/src/sroa.rs
with
4 additions
and
5 deletions
hercules_opt/src/sroa.rs
+
4
−
5
View file @
97c4bbcf
...
@@ -213,7 +213,7 @@ pub fn sroa(editor: &mut FunctionEditor, reverse_postorder: &Vec<NodeID>, types:
...
@@ -213,7 +213,7 @@ pub fn sroa(editor: &mut FunctionEditor, reverse_postorder: &Vec<NodeID>, types:
// enough information to process a particular node, we add it back to the worklist
// enough information to process a particular node, we add it back to the worklist
let
mut
next_id
:
usize
=
editor
.func
()
.nodes
.len
();
let
mut
next_id
:
usize
=
editor
.func
()
.nodes
.len
();
let
mut
to_insert
=
BTreeMap
::
new
();
let
mut
to_insert
=
BTreeMap
::
new
();
let
mut
to_replace
:
Vec
<
(
NodeID
,
NodeID
)
>
=
vec!
[];
let
mut
to_replace
:
Vec
<
(
NodeID
,
NodeID
)
>
=
vec!
[];
while
let
Some
(
mut
item
)
=
worklist
.pop_front
()
{
while
let
Some
(
mut
item
)
=
worklist
.pop_front
()
{
if
let
WorkItem
::
Unhandled
(
node
)
=
item
{
if
let
WorkItem
::
Unhandled
(
node
)
=
item
{
...
@@ -394,10 +394,9 @@ pub fn sroa(editor: &mut FunctionEditor, reverse_postorder: &Vec<NodeID>, types:
...
@@ -394,10 +394,9 @@ pub fn sroa(editor: &mut FunctionEditor, reverse_postorder: &Vec<NodeID>, types:
node
,
node
,
fields
,
fields
,
}
=>
{
}
=>
{
if
let
(
Some
(
thn_fields
),
Some
(
els_fields
))
=
(
if
let
(
Some
(
thn_fields
),
Some
(
els_fields
))
=
field_map
.get
(
&
thn
),
(
field_map
.get
(
&
thn
),
field_map
.get
(
&
els
))
field_map
.get
(
&
els
),
{
)
{
fields
fields
.zip
(
thn_fields
)
.zip
(
thn_fields
)
.zip
(
els_fields
)
.zip
(
els_fields
)
...
...
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