• Manos Koukoutos's avatar
    [wasm][turbofan] Improve inlining heuristics · bce44108
    Manos Koukoutos authored
    This CL improves wasm inlining heuristics in Turbofan, for an average
    8,5% performance improvement in selected benchmarks.
    
    Changes:
    - In WasmInliner::Reduce(), only collect inlining candidates into a
      priority queue, according to WasmInliner::LexicographicOrdering.
      Move actual inlining to Finalize().
    - Remove the InlineFirstFew heuristic. Add two limits to inlining:
      Maximum relative size increase (reversely proportional to the function
      size), and absolute size increase.
    - Pass information about call frequency from liftoff-collected feedback
      to the WasmInliner though the wasm module.
    - Run wasm inlining along other optimizations in the pipeline.
    - Split inlining and speculative inlining tests.
    
    Bug: v8:7748, v8:12166
    Change-Id: Iccee22093db765981889a24451fb458dfce1f1a6
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3222764Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77428}
    bce44108
inlining.js 8.96 KB