Page MenuHomePhabricator

[FunctionAttrs] Remove old "no-capture" and memory behavior argument deduction
Needs ReviewPublic

Authored by jdoerfert on Apr 1 2019, 10:52 AM.

Details

Summary

This removes the old FunctionAttrs "no-capture" and memory behavior
argument deduction.

The code is obsolete as the Attributor deduction is generally more
powerful.

The test cases that were affected by the change now run both passes.

This resolves incorrect behavior (see http://llvm.org/PR41328) as shown
by the changes to "test13" in:

`test/Transforms/FunctionAttrs/readattrs.ll`

Impact on the statistics (-stats) for LLVM-TS + Spec2006:

REMOVED: functionattrs                NumNoCapture                              17 ->        n/a
REMOVED: functionattrs                NumReadNoneArg                           145 ->        n/a
REMOVED: functionattrs                NumReadOnlyArg                           946 ->        n/a

Note that "no-capture" was derived by the now removed code for arguments
that were already annotated. The readnone/only attributes are at least
in parts due to aforementioned bug.