If we know everything is live there is no need to query for liveness.
Indicating a pessimistic fixpoint will cause the state to be "invalid"
which will cause the Attributor to not return the AAIsDead on request,
which will prevent us from querying isAssumedDead().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368223
91177308-0d34-0410-b5e6-
96231b3b80d8
dbgs() << "[AAIsDead] AssumedLiveBlocks: " << AssumedLiveBlocks.size()
<< " Total number of blocks: " << getAnchorScope().size() << "\n");
+ // If we know everything is live there is no need to query for liveness.
+ if (NoReturnCalls.empty() &&
+ getAnchorScope().size() == AssumedLiveBlocks.size()) {
+ // Indicating a pessimistic fixpoint will cause the state to be "invalid"
+ // which will cause the Attributor to not return the AAIsDead on request,
+ // which will prevent us from querying isAssumedDead().
+ indicatePessimisticFixpoint();
+ assert(!isValidState() && "Expected an invalid state!");
+ }
+
return Status;
}