[all-commits] [llvm/llvm-project] 6b825e: [ArgPromotion] Change the condition to check the p...

Pavel Samolysov via All-commits all-commits at lists.llvm.org
Thu Apr 28 09:47:06 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b825e50f7f41f40cb473587bfe65bcb0069da47
      https://github.com/llvm/llvm-project/commit/6b825e50f7f41f40cb473587bfe65bcb0069da47
  Author: Pavel Samolysov <samolisov at gmail.com>
  Date:   2022-04-28 (Thu, 28 Apr 2022)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/ArgumentPromotion.h
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    A llvm/test/Transforms/ArgumentPromotion/max-elements-limit.ll

  Log Message:
  -----------
  [ArgPromotion] Change the condition to check the promotion limit

The condition should be 'ArgParts.size() > MaxElements', so that if we
have exactly 3 elements in the 'ArgParts' vector, the promotion should
be allowed because the 'MaxElement' threshold is not exceeded yet.

The default value for 'MaxElement' has been decreased to 2 in order
to avoid an actual change in argument promoting behavior. However,
this changes byval argument transformation behavior by allowing
adding not more than 2 arguments to the function instead of 3 allowed
before.

Reviewed By: aeubanks

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




More information about the All-commits mailing list