[PATCH] D47339: [GVN,NewGVN] Propagate nonnull if K dominates J.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 24 10:53:12 PDT 2018


fhahn created this revision.
fhahn added reviewers: dberlin, davide, efriedma.
Herald added a subscriber: Prazek.

In combineMetadata, we should be able to preserve K's nonnull metadata,
if K dominates J. This condition should hold for all replacements by
NewGVN/GVN, but I added a bunch of assertions to verify that.

Fixes PR35038.

There probably are additional kinds of metadata that could be preserved
using similar reasoning. This is follow-up work.


https://reviews.llvm.org/D47339

Files:
  include/llvm/Analysis/Utils/Local.h
  lib/Transforms/Scalar/GVN.cpp
  lib/Transforms/Scalar/NewGVN.cpp
  lib/Transforms/Utils/Local.cpp
  test/Transforms/NewGVN/metadata-nonnull.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47339.148451.patch
Type: text/x-patch
Size: 12416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180524/29de459a/attachment-0001.bin>


More information about the llvm-commits mailing list