Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-O2 used_once: keep ops with side-effects #1036

Closed
rurban opened this issue Feb 27, 2014 · 1 comment
Closed

-O2 used_once: keep ops with side-effects #1036

rurban opened this issue Feb 27, 2014 · 1 comment
Assignees

Comments

@rurban
Copy link
Member

rurban commented Feb 27, 2014

-O2 t/compilers/imcc/reg/alloc_2.pir deletes the
P0 = pop P1 line because P0 is nowhere else used.
but we need to keep it as pop P1 is just for side-effects, even if the result is ignored.

@rurban rurban self-assigned this Feb 27, 2014
rurban pushed a commit that referenced this issue Feb 27, 2014
allow used_once elimination only for purely functional ops
without side-effects.
Fixes t/compilers/imcc/reg/alloc.t test 2 alligator 2 - r9629
      t/compilers/imcc/reg/spill_old.t test 1 bug \#32996
and some more.

set ITPUREFUNC in the parser, as this is the best place to find them:
logical un_op and null; artithmetic bin_op and assign_op
@rurban
Copy link
Member Author

rurban commented Feb 27, 2014

Fixed in branch rurban/imccO2 which is dependent on rurban/imccflags

rurban pushed a commit that referenced this issue Feb 27, 2014
allow used_once elimination only for purely functional ops
without side-effects.
Fixes t/compilers/imcc/reg/alloc.t test 2 alligator 2 - r9629
      t/compilers/imcc/reg/spill_old.t test 1 bug \#32996
and some more.

set ITPUREFUNC in the parser, as this is the best place to find them:
logical un_op and null; artithmetic bin_op and assign_op
rurban pushed a commit that referenced this issue Feb 27, 2014
@rurban rurban closed this as completed Feb 27, 2014
rurban pushed a commit that referenced this issue Mar 4, 2014
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
rurban pushed a commit that referenced this issue Mar 4, 2014
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
rurban pushed a commit that referenced this issue Mar 5, 2014
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
rurban pushed a commit that referenced this issue Mar 5, 2014
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
rurban pushed a commit that referenced this issue Oct 26, 2014
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
rurban pushed a commit that referenced this issue Nov 9, 2014
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
rurban pushed a commit that referenced this issue Jan 10, 2015
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
rurban pushed a commit that referenced this issue Feb 15, 2016
opt2 fails with changed used_once semantics: I0 = 10 is side-effecting, but *can* be removed
if I0 is used only once (GH #1036), ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant