HomePhabricator

[FunctionAttrs] Derive willreturn for fns with readonly` & `mustprogress`.

Authored by fhahn on Tue, Jan 12, 11:55 AM.

Description

[FunctionAttrs] Derive willreturn for fns with readonly` & mustprogress.

Similar to D94125, derive willreturn for functions that are readonly and
mustprogress in FunctionAttrs.

To quote the reasoning from D94125:

Since D86233 we have `mustprogress` which, in combination with
`readonly`, implies `willreturn`. The idea is that every side-effect
has to be modeled as a "write". Consequently, `readonly` means there
is no side-effect, and `mustprogress` guarantees that we cannot "loop"
forever without side-effect.

Reviewed By: jdoerfert, nikic

Differential Revision: https://reviews.llvm.org/D94502