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

MIR-OPT: Less conservative EarlyOtherwiseBranch #77163

Commits on Oct 1, 2020

  1. Make the EarlyOtherwiseBranch optimization less conservative

    It is not important that the types match in this optimization.
    Instead, we can apply the optimization more liberally if the layouts match.
    
    Locally when compiling stage 1 std, stage2 and stage 2 std this increases the times the optimization fires from 543 to 573.
    A ~5% increase.
    simonvandel committed Oct 1, 2020
    Configuration menu
    Copy the full SHA
    081074b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a6b728 View commit details
    Browse the repository at this point in the history
  3. Don't need to look at the layout of the types being matched on

    We only need to check that the discriminant value is the same
    simonvandel committed Oct 1, 2020
    Configuration menu
    Copy the full SHA
    3d52e54 View commit details
    Browse the repository at this point in the history
  4. Do not invent new basic block - just jump to already existing bb

    Fixes a miscompilation and generally simplifies the MIR generated
    simonvandel committed Oct 1, 2020
    Configuration menu
    Copy the full SHA
    930898b View commit details
    Browse the repository at this point in the history
  5. remove unused fields

    simonvandel committed Oct 1, 2020
    Configuration menu
    Copy the full SHA
    03e1814 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    67a7013 View commit details
    Browse the repository at this point in the history