[all-commits] [llvm/llvm-project] 46fb81: [NewGVN] Use PredicateInfo info when previously us...

Alina Sbirlea via All-commits all-commits at lists.llvm.org
Mon Dec 13 16:54:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46fb810955076de45be7c0cd4ae2d4fddc111050
      https://github.com/llvm/llvm-project/commit/46fb810955076de45be7c0cd4ae2d4fddc111050
  Author: Alina Sbirlea <asbirlea at google.com>
  Date:   2021-12-13 (Mon, 13 Dec 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/NewGVN.cpp
    A llvm/test/Transforms/NewGVN/pr31613_2.ll

  Log Message:
  -----------
  [NewGVN] Use PredicateInfo info when previously used for the same ssa.copy intrinsic

Symbolic execution using PredicateInfo is only done for the ssa.copy
intrinsic. It's using two potential sources for building the expression:
1. the Value of the instruction for which the instruction is a copy of, and
2. the Value from the contraint in PredicateInfo
It's possible to get into an infinite loop when choosing between these
two, as described in PR31613.

This patch proposes performing swapping of the two values (i.e. choosing
the second one for the expression), if that same second value was chosen
before; this breaks the cycle.

In the testcases provided, where there is a contradiction between the
value from symbolic execution and assume instruction, NewGVN reduces the
assume to assume(false).

Resolves PR31613.

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


  Commit: ac994f831cb7ec7f589d13ef4be53c53b9102899
      https://github.com/llvm/llvm-project/commit/ac994f831cb7ec7f589d13ef4be53c53b9102899
  Author: Alina Sbirlea <asbirlea at google.com>
  Date:   2021-12-13 (Mon, 13 Dec 2021)

  Changed paths:
    M llvm/docs/MemorySSA.rst

  Log Message:
  -----------
  [MemorySSA] Document details regarding MemorySSA's precision.


Compare: https://github.com/llvm/llvm-project/compare/8c107bee702f...ac994f831cb7


More information about the All-commits mailing list