[all-commits] [llvm/llvm-project] 098afd: [ArgPromotion] Make a non-byval promotion attempt ...

Pavel Samolysov via All-commits all-commits at lists.llvm.org
Thu May 12 07:45:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 098afdb0a0f9254f84733fb1987018528a89accc
      https://github.com/llvm/llvm-project/commit/098afdb0a0f9254f84733fb1987018528a89accc
  Author: Pavel Samolysov <samolisov at gmail.com>
  Date:   2022-05-12 (Thu, 12 May 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    A llvm/test/Transforms/ArgumentPromotion/byval-through-pointer-promotion.ll
    M llvm/test/Transforms/ArgumentPromotion/dbg.ll
    M llvm/test/Transforms/ArgumentPromotion/fp80.ll

  Log Message:
  -----------
  [ArgPromotion] Make a non-byval promotion attempt first

It makes sense to make a non-byval promotion attempt first and then
fall back to the byval one. The non-byval ('usual') promotion is
generally better, for example it does promotion even when a structure
has more elements than 'MaxElements' but not all of them are actually
used in the function.

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




More information about the All-commits mailing list