[PATCH] D71852: [Attributor] Reach optimistic fixpoint in AAValueSimplify when the value is constant or undef
Hideto Ueno via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 21:12:41 PST 2019
uenoku updated this revision to Diff 235250.
uenoku added a comment.
Small fix.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71852/new/
https://reviews.llvm.org/D71852
Files:
llvm/lib/Transforms/IPO/Attributor.cpp
Index: llvm/lib/Transforms/IPO/Attributor.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Attributor.cpp
+++ llvm/lib/Transforms/IPO/Attributor.cpp
@@ -3970,6 +3970,14 @@
return Changed | AAValueSimplify::manifest(A);
}
+ /// See AbstractState::indicatePessimisticFixpoint(...).
+ ChangeStatus indicatePessimisticFixpoint() override {
+ // NOTE: Associated value will be returned in a pessimistic fixpoint and is
+ // regarded as known. That's why`indicateOptimisticFixpoint` is called.
+ SimplifiedAssociatedValue = &getAssociatedValue();
+ return indicateOptimisticFixpoint();
+ }
+
protected:
// An assumed simplified value. Initially, it is set to Optional::None, which
// means that the value is not clear under current assumption. If in the
@@ -4069,7 +4077,7 @@
Value &V = getAnchorValue();
// TODO: add other stuffs
- if (isa<Constant>(V) || isa<UndefValue>(V))
+ if (isa<Constant>(V))
indicatePessimisticFixpoint();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71852.235250.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191225/3e8e7ca8/attachment.bin>
More information about the llvm-commits
mailing list