• Stephan Herhut's avatar
    [codegen] Align targets of switch in loops · acb896b5
    Stephan Herhut authored
    The blazor benchmark wobbles around by 5% with seemingly unrelated
    changes to the generated code. I suspect this is due to moving
    target adresses of the switch statement for the interpreter.
    
    Generally, it would make sense to align targets for switch statements
    as per general optimization guidelines. To keep code growth in bounds,
    this change only enables this for switch statements inside of loops.
    
    Local measurements show an improvement of around 5% for blazor and
    hopefully the benchmark will be more stable moving forward.
    
    Bug: chromium:919986 chromium:921477
    Change-Id: I69df38f902d4fcc65af9e95a63ca1f7f14e0fa09
    Reviewed-on: https://chromium-review.googlesource.com/c/1411637Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Commit-Queue: Stephan Herhut <herhut@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#58825}
    acb896b5
instruction.h 55.6 KB