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
d87a9eef
Commit
d87a9eef
authored
Feb 05, 2019
by
Paul
Browse files
Formatting
parent
4e960940
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/dead_code_elimination.cpp
src/dead_code_elimination.cpp
+2
-1
No files found.
src/dead_code_elimination.cpp
View file @
d87a9eef
...
@@ -42,7 +42,8 @@ void dead_code_elimination::apply(program& p) const
...
@@ -42,7 +42,8 @@ void dead_code_elimination::apply(program& p) const
if
(
i
==
last
)
if
(
i
==
last
)
break
;
break
;
// Skip instruction with empty shape as output unless its a builtin or undefined
// Skip instruction with empty shape as output unless its a builtin or undefined
if
(
i
->
get_shape
().
elements
()
==
0
and
not
(
i
->
name
().
front
()
==
'@'
)
and
not
(
i
->
name
()
==
"undefined"
))
if
(
i
->
get_shape
().
elements
()
==
0
and
not
(
i
->
name
().
front
()
==
'@'
)
and
not
(
i
->
name
()
==
"undefined"
))
continue
;
continue
;
assert
(
bidistance
(
p
,
i
,
last
)
>
0
);
assert
(
bidistance
(
p
,
i
,
last
)
>
0
);
fix
([
&
](
auto
self
,
auto
leaf
)
{
fix
([
&
](
auto
self
,
auto
leaf
)
{
...
...
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