Convert noalias parameter attributes into noalias metadata during inlining
authorHal Finkel <hfinkel@anl.gov>
Fri, 25 Jul 2014 15:50:08 +0000 (15:50 +0000)
committerHal Finkel <hfinkel@anl.gov>
Fri, 25 Jul 2014 15:50:08 +0000 (15:50 +0000)
commit9f0a2a8bd546750904c519a26a0b5f54017153e0
tree3b18f5e903fd7aa414913258ab0ee3f47f05e18e
parent6f5c609076f8858a3c3b1b79cc05eebf81830c95
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:
 1. Create a new unqiue scope domain.
 2. For each (used) noalias parameter, create a new alias scope.
 3. 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).
 4. 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213949 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/InlineFunction.cpp
test/Analysis/ScopedNoAliasAA/basic-hierarchy.ll [deleted file]
test/Transforms/Inline/noalias.ll [new file with mode: 0644]
test/Transforms/Inline/noalias2.ll [new file with mode: 0644]