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
b9a296d0
Commit
b9a296d0
authored
Mar 14, 2019
by
Khalique
Browse files
fix cppcheck issue
parent
d45c9d8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
src/eliminate_identity.cpp
src/eliminate_identity.cpp
+1
-7
No files found.
src/eliminate_identity.cpp
View file @
b9a296d0
...
...
@@ -21,13 +21,7 @@ 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
()};
for
(
auto
&
input
:
next_ins_inputs
)
{
if
(
input
==
ins
)
{
input
=
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