[PATCH] D68128: [InstCombine] Fold PHIs with equal incoming pointers

Daniil Suchkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 04:53:13 PDT 2019


DaniilSuchkov created this revision.
DaniilSuchkov added reviewers: spatel, RKSimon, lebedev.ri, apilipenko.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

In case when all incoming values of a PHI are equal pointers, this transformation inserts a definition of such a pointer right after definition of the base pointer and replaces with this value both PHI and all it's incoming pointers. Primary goal of this transformation is canonicalization of this pattern in order to enable optimizations that can't handle PHIs.


https://reviews.llvm.org/D68128

Files:
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/include/llvm/IR/Value.h
  llvm/lib/IR/Value.cpp
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
  llvm/test/Transforms/InstCombine/phi-equal-incoming-pointers.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68128.222119.patch
Type: text/x-patch
Size: 28642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190927/f106b14f/attachment.bin>


More information about the llvm-commits mailing list