[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 16 12:32:48 PDT 2024


================
@@ -0,0 +1,138 @@
+; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op
+; referring to the __llvm_covinit section.
+; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s
+; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s
+
+target datalayout = "E-m:a-p:32:32-Fi32-i64:64-n32"
+target triple = "powerpc-ibm-aix"
+
+; CHECK-RW: .csect __llvm_covinit[RW],3
+; CHECK-RO: .csect __llvm_covinit[RO],3
+; CHECK-NEXT:    .align  3                               # @__llvm_covinit_functions
+; CHECK-NEXT: L..__llvm_covinit_functions:
+; CHECK-NEXT:     .vbyte  4, __llvm_gcov_writeout[DS]
+; CHECK-NEXT:     .vbyte  4, __llvm_gcov_reset[DS]
+; CHECK-NEXT:    .csect __llvm_gcov_ctr_section[RW],3
----------------
hubert-reinterpretcast wrote:

Minor nit: No need to expect that this `csect` will be emitted immediately after the other one.
```suggestion
; CHECK: .csect __llvm_gcov_ctr_section[RW],3
```

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


More information about the cfe-commits mailing list