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

Align meaning for effects and IR flags #50313

Merged
merged 1 commit into from
Jun 28, 2023
Merged

Commits on Jun 27, 2023

  1. Align meaning for effects and IR flags

    This fixes a longstanding todo where the IR_FLAG_EFFECT_FREE flag
    actually required both :effect_free and :nothrow. After this PR,
    it is equivalent to :effect_free only. The mismatch in meaning here
    caused #50311. `Symbol(::String)` is :effect_free, but not :nothrow.
    As a result, setting IR_FLAG_EFFECT_FREE on it was not legal. Later,
    irinterp did discover that it was nothrow and set IR_FLAG_NOTHROW,
    but did not have sufficient information to know that it was also
    :effect_free, so it could not set that flag. With this PR,
    IR_FLAG_EFFECT_FREE is set early in inference, so once irinterp
    discovers IR_FLAG_NOTHROW, the call becomes DCE-eligible as
    desired. Fixes #50311.
    Keno committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    e833ae9 View commit details
    Browse the repository at this point in the history