[PATCH] D86565: [Attributor][FIX] Do not deduce noundef for dead positions
Shinji Okumura via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 11:55:01 PDT 2020
okura created this revision.
Herald added subscribers: llvm-commits, kuter, uenoku, hiraditya.
Herald added a reviewer: uenoku.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: homerdin.
Herald added a project: LLVM.
okura requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added a reviewer: baziotis.
Herald added a subscriber: bbn.
https://reviews.llvm.org/D86565
Files:
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Index: llvm/lib/Transforms/IPO/AttributorAttributes.cpp
===================================================================
--- llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -7743,6 +7743,16 @@
const std::string getAsStr() const override {
return getAssumed() ? "noundef" : "may-undef-or-poison";
}
+
+ ChangeStatus manifest(Attributor &A) override {
+ // We don't manifest noundef attribute for dead positions because the
+ // associated values with dead positions would be replaced with undef
+ // values.
+ if (A.isAssumedDead(getIRPosition(), nullptr, nullptr,
+ /* CheckBBLivenessOnly */ true))
+ return ChangeStatus::UNCHANGED;
+ return AANoUndef::manifest(A);
+ }
};
struct AANoUndefFloating : public AANoUndefImpl {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86565.287730.patch
Type: text/x-patch
Size: 843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200825/683250de/attachment.bin>
More information about the llvm-commits
mailing list