[PATCH] D70749: [InstCombine] do not insert nonnull assumption for undef

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 15:22:48 PST 2019


rnk added a comment.

In D70749#1761120 <https://reviews.llvm.org/D70749#1761120>, @jdoerfert wrote:

> The only alternative I see is to make passes that replace dead values aware of attributes, e.g., let them clear them out. Though, I fear that also hides the problems only a few indirections deeper.


I guess this, then, would be the "simple" fix that will allow us to move forward without making LangRef changes. DAE is already pretty attribute aware. I think it only surveys functions with local linkage, so stripping nonnull from known-dead arguments would be pretty safe.

Another fix would be to treat arguments marked nonnull as live, but that would effectively make all C++ `this` pointers immune to DAE, since they are all nonnull.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70749/new/

https://reviews.llvm.org/D70749





More information about the llvm-commits mailing list