Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
b41fba45
Commit
b41fba45
authored
Mar 14, 2019
by
Khalique
Browse files
formatting
parent
b9a296d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/eliminate_identity.cpp
src/eliminate_identity.cpp
+4
-1
No files found.
src/eliminate_identity.cpp
View file @
b41fba45
...
...
@@ -21,7 +21,10 @@ void eliminate_identity::apply(program& p) const
instruction_ref
identity_input
{
ins
->
inputs
().
at
(
0
)};
auto
next_ins
=
std
::
next
(
ins
);
std
::
vector
<
instruction_ref
>
next_ins_inputs
{
next_ins
->
inputs
()};
std
::
replace_if
(
next_ins_inputs
.
begin
(),
next_ins_inputs
.
end
(),
[
&
](
instruction_ref
&
input
)
{
return
input
==
ins
;},
identity_input
);
std
::
replace_if
(
next_ins_inputs
.
begin
(),
next_ins_inputs
.
end
(),
[
&
](
instruction_ref
&
input
)
{
return
input
==
ins
;
},
identity_input
);
p
.
replace_instruction
(
next_ins
,
next_ins
->
get_operator
(),
next_ins_inputs
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment