[llvm] r367789 - [Attributor][NFC] Invalid DerefState is at fixpoint
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 4 10:55:15 PDT 2019
Author: jdoerfert
Date: Sun Aug 4 10:55:15 2019
New Revision: 367789
URL: http://llvm.org/viewvc/llvm-project?rev=367789&view=rev
Log:
[Attributor][NFC] Invalid DerefState is at fixpoint
Summary:
If the DerefBytesState (and thereby the DerefState) is invalid, we
reached a fixpoint for the whole DerefState as we will not
manifest/provide information then.
Reviewers: uenoku, sstefan1
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65586
Modified:
llvm/trunk/lib/Transforms/IPO/Attributor.cpp
Modified: llvm/trunk/lib/Transforms/IPO/Attributor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Attributor.cpp?rev=367789&r1=367788&r2=367789&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Attributor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Attributor.cpp Sun Aug 4 10:55:15 2019
@@ -1757,9 +1757,10 @@ struct DerefState : AbstractState {
/// See AbstractState::isValidState()
bool isValidState() const override { return DerefBytesState.isValidState(); }
- // See AbstractState::isAtFixpoint()
+ /// See AbstractState::isAtFixpoint()
bool isAtFixpoint() const override {
- return DerefBytesState.isAtFixpoint() && NonNullGlobalState.isAtFixpoint();
+ return !isValidState() || (DerefBytesState.isAtFixpoint() &&
+ NonNullGlobalState.isAtFixpoint());
}
/// See AbstractState::indicateOptimisticFixpoint(...)
More information about the llvm-commits
mailing list