This is an archive of the discontinued LLVM Phabricator instance.

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

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.

Event Timeline

jdoerfert created this revision.Apr 1 2019, 10:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2019, 10:52 AM
sanjoy removed a reviewer: sanjoy.Apr 1 2019, 11:08 AM
fhahn added a subscriber: fhahn.Apr 12 2019, 2:45 AM
reames requested changes to this revision.Mar 25 2020, 11:16 AM

Please post for review once attributor is actually enabled by default. Removing existing code before that point is inappropriate.

This revision now requires changes to proceed.Mar 25 2020, 11:16 AM