Argument attributes like NoAlias and ReadOnly could affect memoryssa and thus earlyCSE in the function simplification pipeline.
https://reviews.llvm.org/D145210 adjusted PostOrderFunctionAttrs placement and caused the argument attributes not referred for the use
in the pipeline. This work (initiated by @nikic) unconditionally performs argument attribute inference in the first function-attrs pass.
Based on @nikic's experiment, the compile-time impact is pretty low: http://llvm-compile-time-tracker.com/compare.php?from=74258f4189e2b6bacabd40ee6f588fd9d1b37741&to=7f7484aee497cdae817b4aa24aed8046f430a816&stat=instructions%3Au
I'd remove this comment and change below to Only infer argument attributes for non-recursive functions, because...