[all-commits] [llvm/llvm-project] 2b646b: [CVP] Don't try to fold load/store operands to con...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Nov 27 00:17:19 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b646b598942b87f25fda1713a3c5e211585ca88
      https://github.com/llvm/llvm-project/commit/2b646b598942b87f25fda1713a3c5e211585ca88
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-11-27 (Mon, 27 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
    M llvm/test/Transforms/CorrelatedValuePropagation/basic.ll

  Log Message:
  -----------
  [CVP] Don't try to fold load/store operands to constant (#73338)

CVP currently tries to fold load/store pointer operands to constants
using LVI. If there is a dominating condition of the form `icmp eq ptr
%p, @g`, then `%p` will be replaced with `@g`.

LVI is geared towards range-based optimizations, and is *very*
inefficient at handling simple pointer equality conditions. We have
other passes that can handle this optimization in a more efficient way,
such as IPSCCP and GVN.

Removing this optimization gives a geomean 0.4-1.2% compile-time
improvement depending on configuration. At the same time, there
is no impact on codegen.




More information about the All-commits mailing list