/// Inequality for IntegerState.
bool operator!=(const IntegerState &R) const { return !(*this == R); }
- /// "Clamp" this state with \p R. The result is the maximum of the known
- /// information but the minimum of the assumed.
+ /// "Clamp" this state with \p R. The result is the minimum of the assumed
+ /// information but not less than what was known before.
+ ///
+ /// TODO: Consider replacing the operator with a call or using it only when
+ /// we can also take the maximum of the known information, thus when
+ /// \p R is not dependent on additional assumed state.
IntegerState operator^=(const IntegerState &R) {
- takeKnownMaximum(R.Known);
takeAssumedMinimum(R.Assumed);
return *this;
}
ChangeStatus updateImpl(Attributor &A) override {
StateType S;
clampReturnedValueStates<AAType, StateType>(A, *this, S);
+ // TODO: If we know we visited all returned values, thus no are assumed
+ // dead, we can take the known information from the state T.
return clampStateAndIndicateChange<StateType>(this->getState(), S);
}
};
ChangeStatus updateImpl(Attributor &A) override {
StateType S;
clampCallSiteArgumentStates<AAType, StateType>(A, *this, S);
+ // TODO: If we know we visited all incoming values, thus no are assumed
+ // dead, we can take the known information from the state T.
return clampStateAndIndicateChange<StateType>(this->getState(), S);
}
};
VisitValueCB))
indicatePessimisticFixpoint();
+ // TODO: If we know we visited all incoming values, thus no are assumed
+ // dead, we can take the known information from the state T.
return clampStateAndIndicateChange(getState(), T);
}