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
263b2e0c
Commit
263b2e0c
authored
3 weeks ago
by
Russel Arbore
Browse files
Options
Downloads
Patches
Plain Diff
whoops
parent
ff03fe68
No related branches found
No related tags found
1 merge request
!208
IP SROA Parameters
Pipeline
#201953
failed
3 weeks ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hercules_opt/src/interprocedural_sroa.rs
+8
-11
8 additions, 11 deletions
hercules_opt/src/interprocedural_sroa.rs
with
8 additions
and
11 deletions
hercules_opt/src/interprocedural_sroa.rs
+
8
−
11
View file @
263b2e0c
use
std
::
collections
::
HashMap
;
use
std
::
iter
::
zip
;
use
hercules_ir
::
ir
::
*
;
use
hercules_ir
::
ir
::
*
;
use
crate
::
*
;
use
crate
::
*
;
...
@@ -51,24 +48,24 @@ pub fn interprocedural_sroa(
...
@@ -51,24 +48,24 @@ pub fn interprocedural_sroa(
let
mut
old_return_type_map
=
vec!
[];
let
mut
old_return_type_map
=
vec!
[];
let
mut
changed
=
false
;
let
mut
changed
=
false
;
for
ret
_typ
in
param_types
.iter
()
{
for
par
_typ
in
param_types
.iter
()
{
if
!
can_sroa_type
(
editor
,
*
ret
_typ
)
{
if
!
can_sroa_type
(
editor
,
*
par
_typ
)
{
old_param_type_map
.push
(
IndexTree
::
Leaf
(
new_param_types
.len
()));
old_param_type_map
.push
(
IndexTree
::
Leaf
(
new_param_types
.len
()));
new_param_types
.push
(
*
ret
_typ
);
new_param_types
.push
(
*
par
_typ
);
}
else
{
}
else
{
let
(
types
,
index
)
=
sroa_type
(
editor
,
*
ret
_typ
,
new_param_types
.len
());
let
(
types
,
index
)
=
sroa_type
(
editor
,
*
par
_typ
,
new_param_types
.len
());
old_param_type_map
.push
(
index
);
old_param_type_map
.push
(
index
);
new_param_types
.extend
(
types
);
new_param_types
.extend
(
types
);
changed
=
true
;
changed
=
true
;
}
}
}
}
for
par
_typ
in
return_types
.iter
()
{
for
ret
_typ
in
return_types
.iter
()
{
if
!
can_sroa_type
(
editor
,
*
par
_typ
)
{
if
!
can_sroa_type
(
editor
,
*
ret
_typ
)
{
old_return_type_map
.push
(
IndexTree
::
Leaf
(
new_return_types
.len
()));
old_return_type_map
.push
(
IndexTree
::
Leaf
(
new_return_types
.len
()));
new_return_types
.push
(
*
par
_typ
);
new_return_types
.push
(
*
ret
_typ
);
}
else
{
}
else
{
let
(
types
,
index
)
=
sroa_type
(
editor
,
*
par
_typ
,
new_return_types
.len
());
let
(
types
,
index
)
=
sroa_type
(
editor
,
*
ret
_typ
,
new_return_types
.len
());
old_return_type_map
.push
(
index
);
old_return_type_map
.push
(
index
);
new_return_types
.extend
(
types
);
new_return_types
.extend
(
types
);
changed
=
true
;
changed
=
true
;
...
...
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