[all-commits] [llvm/llvm-project] 0741de: [Attributor][FIX] Handle droppable uses when repla...
Johannes Doerfert via All-commits
all-commits at lists.llvm.org
Wed Apr 15 22:58:01 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0741dec27b049111094aec22f547651bb42a27ce
https://github.com/llvm/llvm-project/commit/0741dec27b049111094aec22f547651bb42a27ce
Author: Johannes Doerfert <johannes at jdoerfert.de>
Date: 2020-04-16 (Thu, 16 Apr 2020)
Changed paths:
M llvm/include/llvm/Transforms/IPO/Attributor.h
M llvm/lib/Transforms/IPO/Attributor.cpp
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
M llvm/test/Transforms/Attributor/dereferenceable-1.ll
M llvm/test/Transforms/Attributor/nonnull.ll
Log Message:
-----------
[Attributor][FIX] Handle droppable uses when replacing values
Since we use the fact that some uses are droppable in the Attributor we
need to handle them explicitly when we replace uses. As an example, an
assumed dead value can have live droppable users. In those we cannot
replace the value simply by an undef. Instead, we either drop the uses
(via `dropDroppableUses`) or keep them as they are. In this patch we do
both, depending on the situation. For values that are dead but not
necessarily removed we keep droppable uses around because they contain
information we might be able to use later. For values that are removed
we drop droppable uses explicitly to avoid replacement with undef.
More information about the All-commits
mailing list