[llvm] [SHT_LLVM_BB_ADDR_MAP] Adds pretty printing of BFI and BPI for PGO Analysis Map in tools. (PR #82292)

Micah Weston via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 17:52:09 PST 2024


================
@@ -3,12 +3,14 @@
 
 ## Check 64-bit:
 # RUN: yaml2obj %s -DBITS=64 -DADDR=0x999999999 -o %t1.x64.o
-# RUN: llvm-readobj %t1.x64.o --bb-addr-map 2>&1 | FileCheck %s -DADDR=0x999999999 -DFILE=%t1.x64.o --check-prefix=CHECK
+# RUN: llvm-readobj %t1.x64.o --bb-addr-map 2>&1 | FileCheck %s -DADDR=0x999999999 -DFILE=%t1.x64.o --check-prefixes=CHECK,RAW
+# RUN: llvm-readobj %t1.x64.o --bb-addr-map --pretty-pgo-analysis-map 2>&1 | FileCheck %s -DADDR=0x999999999 -DFILE=%t1.x64.o --check-prefixes=CHECK,PRETTY
----------------
red1bluelost wrote:

For readobj, full line matching and strict whitespace is less needed since the structure formatting is done by ScopedPrinters, rather than manual like objdump. The braces and bracket are good enough to validate the fields are printed in the right spot and then trust the spacing is accurate from ScopedPrinters tests. There is a warning that we test for which throws off a full line match since it contains the readobj absolute path which varies by host test machine.

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


More information about the llvm-commits mailing list