[llvm] [Transforms][IPO] Add func suffix in ArgumentPromotion and DeadArgume… (PR #105742)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 17:02:59 PDT 2024


================
@@ -61,7 +61,7 @@
 ; RUN:  -o %t.out 2>&1 | FileCheck %s --check-prefix=DUMP \
 ; RUN:  --check-prefix=STATS --check-prefix=STATS-BE --check-prefix=REMARKS
 
-; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s --check-prefix=IR
+; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s --check-prefix=IRNODIST
----------------
yonghong-song wrote:

> what is this change about?

In original memprof-funcassigncloning.ll, there are two places check prefix IR are used:
```
 52 ; RUN: opt -thinlto-bc %s >%t.o
 53 ; RUN: llvm-lto2 run %t.o -enable-memprof-context-disambiguation \
 54 ; RUN:  -supports-hot-cold-new \
 55 ; RUN:  -r=%t.o,main,plx \
 56 ; RUN:  -r=%t.o,_ZdaPv, \
 57 ; RUN:  -r=%t.o,sleep, \
 58 ; RUN:  -r=%t.o,_Znam, \
 59 ; RUN:  -memprof-verify-ccg -memprof-verify-nodes -memprof-dump-ccg \
 60 ; RUN:  -stats -pass-remarks=memprof-context-disambiguation -save-temps \
 61 ; RUN:  -o %t.out 2>&1 | FileCheck %s --check-prefix=DUMP \
 62 ; RUN:  --check-prefix=STATS --check-prefix=STATS-BE --check-prefix=REMARKS
 63 
 **64 ; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s --check-prefix=IR**
 65 
 66 
 67 ;; Try again but with distributed ThinLTO
 68 ; RUN: llvm-lto2 run %t.o -enable-memprof-context-disambiguation \
 69 ; RUN:  -supports-hot-cold-new \
 70 ; RUN:  -thinlto-distributed-indexes \
 71 ; RUN:  -r=%t.o,main,plx \
 72 ; RUN:  -r=%t.o,_ZdaPv, \
 73 ; RUN:  -r=%t.o,sleep, \
 74 ; RUN:  -r=%t.o,_Znam, \
 75 ; RUN:  -memprof-verify-ccg -memprof-verify-nodes -memprof-dump-ccg \
 76 ; RUN:  -stats -pass-remarks=memprof-context-disambiguation \
 77 ; RUN:  -o %t2.out 2>&1 | FileCheck %s --check-prefix=DUMP \
 78 ; RUN:  --check-prefix=STATS
 79 
 80 ;; Run ThinLTO backend
 81 ; RUN: opt -passes=memprof-context-disambiguation \
 82 ; RUN:  -memprof-import-summary=%t.o.thinlto.bc \
 83 ; RUN:  -stats -pass-remarks=memprof-context-disambiguation \
 **84 ; RUN:  %t.o -S 2>&1 | FileCheck %s --check-prefix=IR \**
 85 ; RUN:  --check-prefix=STATS-BE --check-prefix=REMARKS
```

With added suffix, the function signature will change for one 'IR' check but not another. That is why I renamed one IR to IRNODIST where the IRNODIST flavor has func signature change to minimize the change.

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


More information about the llvm-commits mailing list