Page MenuHomePhabricator

[Attributor] Deduce attributes for non-exact functions

Authored by bbn on Wed, Mar 18, 7:58 PM.



This patch is based on D63312 and D63319. For now we create shallow wrappers for all functions that are IPO amendable.
See also this github issue.

Diff Detail

Event Timeline

bbn created this revision.Wed, Mar 18, 7:58 PM
bbn set the repository for this revision to rG LLVM Github Monorepo.Wed, Mar 18, 7:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Mar 18, 7:59 PM
bbn updated this revision to Diff 251253.Wed, Mar 18, 8:29 PM

Updated createShallowWrapper() function

bbn updated this revision to Diff 251359.Thu, Mar 19, 5:57 AM
  • Added tests
  • Added noinline attribute to call site to prevent the internal function being inlined
kuter added a subscriber: kuter.Thu, Mar 19, 5:31 PM
jdoerfert added inline comments.Thu, Mar 19, 5:34 PM

run it with the new pass manager as well -passes=attributor and verify we set the norecurse attribute on the wrapped functions.


add the name of the function, even if it is @0 or something. Here and above at the call site.

bbn marked an inline comment as done.Thu, Mar 19, 9:07 PM
bbn added inline comments.

did you mean -passes=attributor-cgscc ?

bbn updated this revision to Diff 251561.Fri, Mar 20, 12:15 AM
  • update tests
jdoerfert accepted this revision.Fri, Mar 20, 9:46 AM

Two nits, otherwise LGTM.


NumAttrsRequiredDeepWrapper is not used, or is it?


Yes, sorry for the confusion.


Add a CHECK-NOT: Function Attrs before this line.

This revision is now accepted and ready to land.Fri, Mar 20, 9:46 AM

Adjust the commit title please.

bbn updated this revision to Diff 251810.Fri, Mar 20, 5:26 PM
bbn retitled this revision from [WIP][Attributor] Deduce attributes for non-exact functions to [Attributor] Deduce attributes for non-exact functions.
  • added some CHECK-NOT to tests
  • deleted unused statistic