[llvm] [SHT_LLVM_BB_ADDR_MAP] Add an option to skip emitting bb entries (PR #114447)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 02:35:46 PDT 2024


================
@@ -0,0 +1,96 @@
+## This test checks how llvm-readobj prints for skipped BB entries(-skip-emit-bb-entries) file.
+
+## Check 64-bit:
+# RUN: yaml2obj %s -DBITS=64 -o %t1.x64.o
+# RUN: llvm-readobj %t1.x64.o --bb-addr-map 2>&1 | FileCheck --match-full-lines %s  -DFILE=%t1.x64.o
+
+## Check 32-bit:
+# RUN: yaml2obj %s -DBITS=32 -o %t1.x32.o
+# RUN: llvm-readobj %t1.x32.o --bb-addr-map 2>&1 | FileCheck --match-full-lines  %s -DFILE=%t1.x32.o
+
+
+# CHECK:     BBAddrMap [
+# CHECK-NEXT:  Function {
+# CHECK-NEXT:    At: 0x11111
+# CHECK-NEXT:    Name: foo
+# CHECK-NEXT:    BB Ranges [
+# CHECK-NEXT:      {
+# CHECK-NEXT:        Base Address: 0x11111
+# CHECK-NEXT:        BB Entries [
+# CHECK-NEXT:        ]
+# CHECK-NEXT:      }
+# CHECK-NEXT:    ]
+# CHECK-NEXT:    PGO analyses {
+# CHECK-NEXT:      FuncEntryCount: 100
+# CHECK-NEXT:      PGO BB entries [
+# CHECK-NEXT:      ]
+# CHECK-NEXT:    }
+# CHECK-NEXT:  }
+# CHECK-NEXT:]
+# CHECK-NEXT:BBAddrMap [
+# CHECK-NEXT:  Function {
+# CHECK-NEXT:    At: 0x33333
+# CHECK-NEXT:    Name: bar
+# CHECK-NEXT:    BB Ranges [
+# CHECK-NEXT:      {
+# CHECK-NEXT:        Base Address: 0x33333
+# CHECK-NEXT:        BB Entries [
+# CHECK-NEXT:        ]
+# CHECK-NEXT:      }
+# CHECK-NEXT:    ]
+# CHECK-NEXT:    PGO analyses {
+# CHECK-NEXT:      FuncEntryCount: 89
+# CHECK-NEXT:      PGO BB entries [
+# CHECK-NEXT:      ]
+# CHECK-NEXT:    }
+# CHECK-NEXT:  }
+# CHECK-NEXT:]
+
+
+
+
+
----------------
jh7370 wrote:

Same comment as above.

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


More information about the llvm-commits mailing list