[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 04:05:49 PST 2019
uenoku created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a project: LLVM.
As discussed in D71799 <https://reviews.llvm.org/D71799>, we have found that it is more useful to reach an optimistic fixpoint in AAValueSimpify when the value is constant or undef.
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
@@ -4069,8 +4069,10 @@
Value &V = getAnchorValue();
// TODO: add other stuffs
- if (isa<Constant>(V) || isa<UndefValue>(V))
- indicatePessimisticFixpoint();
+ if (isa<Constant>(V) || isa<UndefValue>(V)) {
+ SimplifiedAssociatedValue = &V;
+ indicateOptimisticFixpoint();
+ }
}
/// See AbstractAttribute::updateImpl(...).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71852.235215.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191224/36a1712b/attachment.bin>
More information about the llvm-commits
mailing list