[Attributor] Use "simplify to constant" in genericValueTraversal
authorJohannes Doerfert <johannes@jdoerfert.de>
Sun, 10 May 2020 04:29:43 +0000 (23:29 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Mon, 11 May 2020 00:06:11 +0000 (19:06 -0500)
commit713ee3aa77d938b1cb8d3a85968bc5dbe661aafc
tree7bf2973e8b624c1c5054012cbcb361999c9867be
parent513ac6e9b045dd2d5e0d1a5e221380cfb999676a
[Attributor] Use "simplify to constant" in genericValueTraversal

As we replace values with constants interprocedurally, we also need to
do this "look-through" step during the generic value traversal or we
would derive properties from replaced values. While this is often not
problematic, it is when we use the "kind" of a value for reasoning,
e.g., accesses to arguments allow `argmemonly`.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
llvm/test/Transforms/Attributor/ArgumentPromotion/pr32917.ll
llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
llvm/test/Transforms/Attributor/memory_locations.ll
llvm/test/Transforms/Attributor/nonnull.ll