[PATCH] D76404: [WIP][Attributor] Deduce attributes for non-exact functions

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 10:17:17 PDT 2020


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

Two nits, otherwise LGTM.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:62
+STATISTIC(NumAttrsRequiredDeepWrapper,
+          "Number of non-trivial attributes requiring a deep wrapper");
 STATISTIC(NumAttributesTimedOut,
----------------
`NumAttrsRequiredDeepWrapper` is not used, or is it?


================
Comment at: llvm/test/Transforms/Attributor/wrapper.ll:1
+; RUN: opt -attributor -attributor-disable=false -attributor-annotate-decl-cs -attributor-allow-shallow-wrappers -S < %s | FileCheck %s --check-prefix=CHECK
+
----------------
bbn wrote:
> jdoerfert wrote:
> > run it with the new pass manager as well `-passes=attributor` and verify we set the `norecurse` attribute on the wrapped functions.
> did you mean `-passes=attributor-cgscc` ? 
Yes, sorry for the confusion.


================
Comment at: llvm/test/Transforms/Attributor/wrapper.ll:5
+; A wrapper will be generated for this function, Check the wrapper first
+; CHECK: define linkonce i32 @inner1()
+; CHECK: tail call i32 @0()
----------------
Add a `CHECK-NOT: Function Attrs` before this line.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76404/new/

https://reviews.llvm.org/D76404





More information about the llvm-commits mailing list