Convert noalias parameter attributes into noalias metadata during inlining
This functionality is currently turned off by default.
Part of the motivation for introducing scoped-noalias metadata is to enable the
preservation of noalias parameter attribute information after inlining.
Sometimes this can be inferred from the code in the caller after inlining, but
often we simply lose valuable information.
The overall process if fairly simple:
- Create a new unqiue scope domain.
- For each (used) noalias parameter, create a new alias scope.
- For each pointer, collect the underlying objects. Add a noalias scope for each noalias parameter from which we're not derived (and has not been captured prior to that point).
- Add an alias.scope for each noalias parameter from which we might be derived (or has been captured before that point).
Note that the capture checks apply only if one of the underlying objects is not
an identified function-local object.