[PATCH] D104475: [Clang][Codegen] emit noprofile IR Fn Attr for new Fn Attr no_profile

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 17 11:28:30 PDT 2021


MaskRay added a comment.

Should `no_profile` specify the inlining behavior? Though `no_sanitize_*` don't specify that, either.

As I commented on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 , the Linux kernel specifies `noinline` so the exact inlining behavior doesn't matter.

  #define noinstr                                                         \
          noinline notrace __attribute((__section__(".noinstr.text")))    \
          __no_kcsan __no_sanitize_address



================
Comment at: clang/test/CodeGen/fprofile.c:19
+// CHECK: attributes [[ATTR]] = {{.*}} noprofile
+// CHECK-NOT: attributes [[ATTR2]] = {{.*}} noprofile
----------------
```
// CHECK:     attributes [[ATTR2]] = {
// CHECK-NOT: noprofile
// CHECK:     }
```

otherwise the test may become stale if the order of ATTR and ATTR2 shuffles.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104475



More information about the cfe-commits mailing list