Page MenuHomePhabricator

[Attributor] Deduce "no-capture" argument attribute
Needs ReviewPublic

Authored by jdoerfert on Mar 28 2019, 1:23 AM.



Add the no-capture argument attribute deduction to the Attributor
fixpoint framework.

The new string attributed "no-capture-maybe-returned" is introduced to
allow deduction of no-capture through functions that "capture" an
argument but only by "returning" it.

Impact on the statistics (-stats) for LLVM-TS + Spec2006, ~7% more no-capute arguments:

CHANGED: attributor                   NumAttributesManifested                14323 ->      50306 (  +251.225%)                                                                                 
CHANGED: attributor                   NumAttributesValidFixpoint             39780 ->      81666 (  +105.294%)                                                                                 
  ADDED: attributor                   NumFnArgumentNoCapture                   n/a ->      35429
CHANGED: functionattrs                NumNoCapture                           32989 ->          2 (   -99.994%)

Note: both remaining function attribute deductions are deduction of no-capture even though it is already present.

Event Timeline

jdoerfert created this revision.Mar 28 2019, 1:23 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 28 2019, 1:23 AM
jdoerfert marked 2 inline comments as done.Mar 28 2019, 5:06 PM
jdoerfert added inline comments.

The comments on this one were off from the very beginning, I'll fix them and there won't be a change during this commit.


So, the old FuncAttr deduction interleaves one of two memory behavior deductions with the capture analysis. With this patch capture analysis becomes obsolete, as the attributor added annotations, and certain memory behavior attributes are not detected anymore. There will be a memory behavior detection for the attributor soon which should make this problem go away.

Closed a side-channel through "integers"

jdoerfert edited the summary of this revision. (Show Details)Apr 1 2019, 8:26 AM
sanjoy removed a reviewer: sanjoy.Apr 1 2019, 11:06 AM