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

irinterp: Allow setting all IR flags #48993

Merged
merged 1 commit into from
Mar 14, 2023
Merged

irinterp: Allow setting all IR flags #48993

merged 1 commit into from
Mar 14, 2023

Conversation

Keno
Copy link
Member

@Keno Keno commented Mar 13, 2023

Currently, IR_FLAG_NOTHROW is the only flag that irinterp is allowed to set on statements, under the assumption that in order for a call to be irinterp-eligible, it must have been proven :foldable, thus :effect_free, and thus IR_FLAG_EFFECT_FREE was assumed to have been set. That reasoning was sound at the time this code was written, but have since introduced EFFECT_FREE_IF_INACCESSIBLEMEMONLY, which breaks the reasoning that an :effect_free inference for the whole function implies the flag on every statement. As a result, we were failing to DCE otherwise dead statements if the IR came from irinterp.

Currently, IR_FLAG_NOTHROW is the only flag that irinterp is allowed to
set on statements, under the assumption that in order for a call to
be irinterp-eligible, it must have been proven :foldable, thus :effect_free,
and thus IR_FLAG_EFFECT_FREE was assumed to have been set. That reasoning
was sound at the time this code was written, but have since introduced
EFFECT_FREE_IF_INACCESSIBLEMEMONLY, which breaks the reasoning that
an :effect_free inference for the whole function implies the flag on
every statement. As a result, we were failing to DCE otherwise dead
statements if the IR came from irinterp.
@aviatesk aviatesk merged commit 7ba7e32 into master Mar 14, 2023
@aviatesk aviatesk deleted the kf/irinterpflag branch March 14, 2023 14:42
oscardssmith pushed a commit to oscardssmith/julia that referenced this pull request Mar 20, 2023
Currently, `IR_FLAG_NOTHROW` is the only flag that irinterp is allowed to
set on statements, under the assumption that in order for a call to
be irinterp-eligible, it must have been proven `:foldable`, thus `:effect_free`,
and thus `IR_FLAG_EFFECT_FREE` was assumed to have been set. That reasoning
was sound at the time this code was written, but have since introduced
`EFFECT_FREE_IF_INACCESSIBLEMEMONLY`, which breaks the reasoning that
an `:effect_free` inference for the whole function implies the flag on
every statement. As a result, we were failing to DCE otherwise dead
statements if the IR came from irinterp.
Xnartharax pushed a commit to Xnartharax/julia that referenced this pull request Apr 19, 2023
Currently, `IR_FLAG_NOTHROW` is the only flag that irinterp is allowed to
set on statements, under the assumption that in order for a call to
be irinterp-eligible, it must have been proven `:foldable`, thus `:effect_free`,
and thus `IR_FLAG_EFFECT_FREE` was assumed to have been set. That reasoning
was sound at the time this code was written, but have since introduced
`EFFECT_FREE_IF_INACCESSIBLEMEMONLY`, which breaks the reasoning that
an `:effect_free` inference for the whole function implies the flag on
every statement. As a result, we were failing to DCE otherwise dead
statements if the IR came from irinterp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants