[all-commits] [llvm/llvm-project] b805e9: [PredicateInfo] Add additional RenamedOp field to PB.

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Jul 9 01:52:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b805e944773e119461903e5140389072c02796bf
      https://github.com/llvm/llvm-project/commit/b805e944773e119461903e5140389072c02796bf
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/PredicateInfo.h
    M llvm/lib/Transforms/Utils/PredicateInfo.cpp

  Log Message:
  -----------
  [PredicateInfo] Add additional RenamedOp field to PB.

 OriginalOp of a predicate always refers to the original IR
value that was renamed. So for nested predicates of the same value, it
will always refer to the original IR value.

For the use in SCCP however, we need to find the renamed value that is
currently used in the condition associated with the predicate. This
patch adds a new RenamedOp field to do exactly that.

NewGVN currently relies on the existing behavior to merge instruction
metadata. A test case to check for exactly that has been added in
195fa4bfae10.

Reviewers: efriedma, davide, nikic

Reviewed By: nikic

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




More information about the All-commits mailing list