[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 11:59:00 PDT 2024


================
@@ -0,0 +1,24 @@
+// REQUIRES: bpf-registered-target
+// RUN: %clang_cc1 -triple bpf -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
+
+#define __bpf_fastcall __attribute__((bpf_fastcall))
+
+void test(void) __bpf_fastcall;
+void (*ptr)(void) __bpf_fastcall;
+
+void foo(void) {
+  test();
+  (*ptr)();
+}
+
+// CHECK: @ptr = global ptr null
+// CHECK: define {{.*}} @foo()
----------------
eddyz87 wrote:

Will change

https://github.com/llvm/llvm-project/pull/101228


More information about the llvm-commits mailing list