[all-commits] [llvm/llvm-project] 0f6691: [GlobalMerge] Add MinSize feature to the GlobalMer...

Michael Maitland via All-commits all-commits at lists.llvm.org
Mon Jun 3 06:11:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f669154e114357d0af5eccd09f8e031c07a8a3e
      https://github.com/llvm/llvm-project/commit/0f669154e114357d0af5eccd09f8e031c07a8a3e
  Author: Michael Maitland <michaeltmaitland at gmail.com>
  Date:   2024-06-03 (Mon, 03 Jun 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalMerge.h
    M llvm/lib/CodeGen/GlobalMerge.cpp
    A llvm/test/CodeGen/RISCV/global-merge-minsize-smalldata-nonzero.ll
    A llvm/test/CodeGen/RISCV/global-merge-minsize-smalldata-zero.ll
    A llvm/test/CodeGen/RISCV/global-merge-minsize.ll

  Log Message:
  -----------
  [GlobalMerge] Add MinSize feature to the GlobalMerge Pass. (#93686)

We add a feature that prevents the GlobalMerge pass from considering
data smaller than a minimum size in bytes for merging.

The MinSize is set in 3 ways:
1. If global-merge-min-data-size is explicitly set, then it uses that
value.
2. If SmallDataLimit is set and non-zero, then SmallDataLimit + 1 is
used.
3. Otherwise, 0 is used, which means all sizes are considered for
merging.

We found that this feature allowed us to see the benefit of the
GlobalMerge pass while eliminating some merging that was not beneficial.
This feature allowed us to enable the GlobalMerge pass on RISC-V in our
downstream by default because it led to improvements on multiple
benchmark suites.

I plan to post a separate patch to propose enabling this by default on
RISC-V. But I do not want that discussion to be part of the discussion
of adding this feature, so I am keeping the patches separate.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list