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
58681660
Commit
58681660
authored
Aug 22, 2018
by
Paul
Browse files
Remove builtins with dce
parent
6b80ea7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/dead_code_elimination.cpp
src/dead_code_elimination.cpp
+2
-2
No files found.
src/dead_code_elimination.cpp
View file @
58681660
...
@@ -16,8 +16,8 @@ void dead_code_elimination::apply(program& p) const
...
@@ -16,8 +16,8 @@ void dead_code_elimination::apply(program& p) const
if
(
ins
==
p
.
begin
())
if
(
ins
==
p
.
begin
())
continue
;
continue
;
const
auto
i
=
std
::
prev
(
ins
);
const
auto
i
=
std
::
prev
(
ins
);
// Skip instruction with empty shape as output
// Skip instruction with empty shape as output
unless its a builtin
if
(
i
->
result
.
elements
()
==
0
)
if
(
i
->
result
.
elements
()
==
0
and
not
(
i
->
op
.
name
().
front
()
==
'@'
)
)
continue
;
continue
;
// Skip the last instruction
// Skip the last instruction
if
(
i
==
last
)
if
(
i
==
last
)
...
...
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