/* CheckBBLivenessOnly */ true))
CS = AA.update(*this);
- if (!AA.isQueryAA() && DV.empty()) {
- // If the attribute did not query any non-fix information, the state
- // will not change and we can indicate that right away.
- AAState.indicateOptimisticFixpoint();
+ if (!AA.isQueryAA() && DV.empty() && !AA.getState().isAtFixpoint()) {
+ // If the AA did not rely on outside information but changed, we run it
+ // again to see if it found a fixpoint. Most AAs do but we don't require
+ // them to. Hence, it might take the AA multiple iterations to get to a
+ // fixpoint even if it does not rely on outside information, which is fine.
+ ChangeStatus RerunCS = ChangeStatus::UNCHANGED;
+ if (CS == ChangeStatus::CHANGED)
+ RerunCS = AA.update(*this);
+
+ // If the attribute did not change during the run or rerun, and it still did
+ // not query any non-fix information, the state will not change and we can
+ // indicate that right at this point.
+ if (RerunCS == ChangeStatus::UNCHANGED && !AA.isQueryAA() && DV.empty())
+ AAState.indicateOptimisticFixpoint();
}
if (!AAState.isAtFixpoint())