From: Johannes Doerfert Date: Sun, 4 Aug 2019 17:55:15 +0000 (+0000) Subject: [Attributor][NFC] Invalid DerefState is at fixpoint X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b25675fa45dc5c9ba8c00ebb0dee69bdda27cdb2;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367789 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/Attributor.cpp b/lib/Transforms/IPO/Attributor.cpp index 803152ef812..fabb50fb38a 100644 --- a/lib/Transforms/IPO/Attributor.cpp +++ b/lib/Transforms/IPO/Attributor.cpp @@ -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(...)