|
5 | 5 |
|
6 | 6 | ; RUN: opt -thinlto-bc %s >%t.o
|
7 | 7 |
|
8 |
| -;; By default we should enable cloning of contexts involved with recursive |
| 8 | +;; Check behavior when we enable cloning of contexts involved with recursive |
9 | 9 | ;; cycles, but not through the cycle itself. I.e. until full support for
|
10 | 10 | ;; recursion is added, the cloned recursive call from C back to B (line 12) will
|
11 | 11 | ;; not be updated to call a clone.
|
|
18 | 18 | ; RUN: -r=%t.o,_Znam, \
|
19 | 19 | ; RUN: -memprof-verify-ccg -memprof-verify-nodes \
|
20 | 20 | ; RUN: -pass-remarks=memprof-context-disambiguation \
|
| 21 | +; RUN: -memprof-allow-recursive-callsites=true \ |
21 | 22 | ; RUN: -o %t.out 2>&1 | FileCheck %s \
|
22 | 23 | ; RUN: --implicit-check-not "memprof_recursive3.cc:12:10: call in clone _Z1Ci.memprof.1 assigned" \
|
23 | 24 | ; RUN: --check-prefix=ALLOW-RECUR-CALLSITES --check-prefix=ALLOW-RECUR-CONTEXTS
|
|
38 | 39 | ; RUN: --implicit-check-not="created clone" \
|
39 | 40 | ; RUN: --implicit-check-not="marked with memprof allocation attribute cold"
|
40 | 41 |
|
| 42 | +;; Check the default behavior (disabled recursive callsites). |
| 43 | +; RUN: llvm-lto2 run %t.o -enable-memprof-context-disambiguation \ |
| 44 | +; RUN: -supports-hot-cold-new \ |
| 45 | +; RUN: -r=%t.o,_Z1Dv,plx \ |
| 46 | +; RUN: -r=%t.o,_Z1Ci,plx \ |
| 47 | +; RUN: -r=%t.o,_Z1Bi,plx \ |
| 48 | +; RUN: -r=%t.o,main,plx \ |
| 49 | +; RUN: -r=%t.o,_Znam, \ |
| 50 | +; RUN: -memprof-verify-ccg -memprof-verify-nodes \ |
| 51 | +; RUN: -pass-remarks=memprof-context-disambiguation \ |
| 52 | +; RUN: -o %t.out 2>&1 | FileCheck %s --allow-empty \ |
| 53 | +; RUN: --implicit-check-not "memprof_recursive3.cc:12:10: call in clone _Z1Ci.memprof.1 assigned" \ |
| 54 | +; RUN: --implicit-check-not="created clone" \ |
| 55 | +; RUN: --implicit-check-not="marked with memprof allocation attribute cold" |
| 56 | + |
41 | 57 | ;; Skipping recursive contexts should prevent spurious call to cloned version of
|
42 | 58 | ;; B from the context starting at memprof_recursive.cc:19:13, which is actually
|
43 | 59 | ;; recursive (until that support is added).
|
|
50 | 66 | ; RUN: -r=%t.o,_Znam, \
|
51 | 67 | ; RUN: -memprof-verify-ccg -memprof-verify-nodes \
|
52 | 68 | ; RUN: -pass-remarks=memprof-context-disambiguation \
|
| 69 | +; RUN: -memprof-allow-recursive-callsites=true \ |
53 | 70 | ; RUN: -memprof-allow-recursive-contexts=false \
|
54 | 71 | ; RUN: -o %t.out 2>&1 | FileCheck %s \
|
55 | 72 | ; RUN: --implicit-check-not "memprof_recursive3.cc:12:10: call in clone _Z1Ci.memprof.1 assigned" \
|
|
0 commit comments