[all-commits] [llvm/llvm-project] c0de28: [BasicAA] Don't short-circuit non-capturing arguments

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jun 26 03:27:49 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c0de28b92e98acbeb739eae8a4d762aec77f2705
      https://github.com/llvm/llvm-project/commit/c0de28b92e98acbeb739eae8a4d762aec77f2705
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/test/Transforms/PhaseOrdering/dse-ephemeral-value-captures.ll

  Log Message:
  -----------
  [BasicAA] Don't short-circuit non-capturing arguments

This is an alternative to D153464. BasicAA currently assumes that
an unescaped alloca cannot be read through non-nocapture arguments
of a call, based on the argument that if the argument were based on
the alloca, it would not be unescaped.

This currently fails in the case where the call is an ephemeral value
and as such does not count as a capture. It also happens for calls
that are readonly+nounwind+void, though that case tends to not matter
in practice, because such calls will get DCEd anyway.

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




More information about the All-commits mailing list