[all-commits] [llvm/llvm-project] 8b8466: [ArgumentPromotion] Bail if any callers are minsize

aeubanks via All-commits all-commits at lists.llvm.org
Wed May 3 11:29:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8b8466fd31e5a194fd8ba7a73a0f23d32f164318
      https://github.com/llvm/llvm-project/commit/8b8466fd31e5a194fd8ba7a73a0f23d32f164318
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2023-05-03 (Wed, 03 May 2023)

  Changed paths:
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    A llvm/test/Transforms/ArgumentPromotion/minsize.ll

  Log Message:
  -----------
  [ArgumentPromotion] Bail if any callers are minsize

Argument promotion mostly works on functions with more than one caller (otherwise the function would be inlined or is dead), so there's a good chance that performing this increases code size since we introduce loads at every call site. If any caller is marked minsize, bail.

We could compare the number of loads/stores removed from the function with the number of loads introduced in callers, but that's TODO.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D149768




More information about the All-commits mailing list