Skip to content

Commit 01bdd8c

Browse files
committed
[llvm-jitlink] Rename -show-graph option to -show-graphs, make it a regex.
The original -show-graph option dumped the LinkGraph for all graphs loaded into the session, but can make it difficult to see small graphs (e.g. reduced test cases) among the surrounding larger files (especially the ORC runtime). The new -show-graphs option takes a regex and dumps only those graphs matching the regex. This allows testcases to specify exactly which graphs to dump.
1 parent 0430324 commit 01bdd8c

12 files changed

+35
-24
lines changed

llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_associative_dead_strip.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RUN: yaml2obj %s -o %t
22
# RUN: llvm-jitlink -noexec \
33
# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
4-
# RUN: -show-graph -noexec %t 2>&1 | FileCheck %s
5-
#
4+
# RUN: -show-graphs='.*' -noexec %t 2>&1 | FileCheck %s
5+
#
66
# Check a comdat child block connected by associative selection type is dead strip when
77
# parent block is dead.
88
#

llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_associative_no_dead_strip.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# RUN: yaml2obj %s -o %t
22
# RUN: llvm-jitlink -noexec \
33
# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
4-
# RUN: -show-graph -noexec %t 2>&1 | FileCheck %s
5-
#
4+
# RUN: -show-graphs='.*' -noexec %t 2>&1 | FileCheck %s
5+
#
66
# Check a comdat child block connected by associative selection type is not dead strip when
77
# parent block is alive.
88
#

llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_weak_duplicate.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# RUN: yaml2obj %S/Inputs/COFF_comdat_weak_def.yaml -o %t/COFF_weak_1.o
33
# RUN: yaml2obj %S/Inputs/COFF_comdat_weak_def.yaml -o %t/COFF_weak_2.o
44
# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %s -o %t/COFF_main.o
5-
# RUN:
5+
# RUN:
66
# RUN: llvm-jitlink -noexec %t/COFF_main.o %t/COFF_weak_1.o %t/COFF_weak_2.o \
77
# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
8-
# RUN: -show-graph -noexec 2>&1 | FileCheck %s
8+
# RUN: -show-graphs='.*' -noexec 2>&1 | FileCheck %s
99
#
1010
# Check that duplicate comdat any definitions don't generate duplicate definition error.
1111
#
@@ -26,4 +26,4 @@
2626
.p2align 4, 0x90
2727
main:
2828
callq func
29-
retq
29+
retq

llvm/test/ExecutionEngine/JITLink/X86/COFF_label.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: yaml2obj %s -o %t
22
# RUN: llvm-jitlink -noexec \
33
# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
4-
# RUN: -show-graph -noexec %t 2>&1 | FileCheck %s
4+
# RUN: -show-graphs='.*' -noexec %t 2>&1 | FileCheck %s
55
#
66
# Check a label symbol with an offset is created as defined symbol.
77
#

llvm/test/ExecutionEngine/JITLink/X86/COFF_pdata_no_strip.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN:
33
# RUN: llvm-jitlink -abs __ImageBase=0xdeadbeaf -noexec %t \
44
# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
5-
# RUN: -show-graph -noexec 2>&1 | FileCheck %s
5+
# RUN: -show-graphs='.*' -noexec 2>&1 | FileCheck %s
66
#
77
# Check that basic seh frame inside pdata of alive function is not dead-stripped out.
88
# CHECK: section .xdata:

llvm/test/ExecutionEngine/JITLink/X86/COFF_pdata_strip.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN:
33
# RUN: llvm-jitlink -abs __ImageBase=0xdeadbeaf -noexec %t \
44
# RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
5-
# RUN: -show-graph -noexec 2>&1 | FileCheck %s
5+
# RUN: -show-graphs='.*' -noexec 2>&1 | FileCheck %s
66
#
77
# Check that basic seh frame of dead block is dead-stripped out
88
#

llvm/test/ExecutionEngine/JITLink/X86/MachO-duplicate-local.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: yaml2obj %s -o %t
2-
# RUN: llvm-jitlink -noexec -show-graph %t | FileCheck %s
2+
# RUN: llvm-jitlink -noexec -show-graphs='.*' %t | FileCheck %s
33

44
# The below describes an object with two local symbols named _foo, each
55
# referenced by _main to keep it live. Ensure we can link it.

llvm/test/ExecutionEngine/JITLink/X86/MachO_weak_local.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t %s
2-
# RUN: llvm-jitlink -noexec %t -show-graph | FileCheck %s
2+
# RUN: llvm-jitlink -noexec %t -show-graphs='.*' | FileCheck %s
33

44
# CHECK: linkage: weak, scope: local, live - _foo_weak
55

llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_self_relocation.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t %S/Inputs/x86-64_self_relocation.s
2-
# RUN: llvm-jitlink -noexec -show-graph %t 2>&1 | \
2+
# RUN: llvm-jitlink -noexec -show-graphs='.*' %t 2>&1 | \
33
# RUN: FileCheck -check-prefix=WITHOUT %s
4-
# RUN: llvm-jitlink -noexec -show-graph -add-self-relocations %t 2>&1 | \
4+
# RUN: llvm-jitlink -noexec -show-graphs='.*' -add-self-relocations %t 2>&1 | \
55
# RUN: FileCheck -check-prefix=CHECK %s
66

77
# WITHOUT: block

llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_self_relocation_exec.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t %S/Inputs/x86-64_self_relocation.s
2-
# RUN: llvm-jitlink -show-graph %t
3-
# RUN: llvm-jitlink -show-graph -add-self-relocations %t
2+
# RUN: llvm-jitlink -show-graphs='.*' %t
3+
# RUN: llvm-jitlink -show-graphs='.*' -add-self-relocations %t
44

55
# Ensure that the added relocation does not create an incorrect pointer.
66

0 commit comments

Comments
 (0)