diff options
author | Keno Fischer <kfischer@college.harvard.edu> | 2015-11-06 00:12:50 +0000 |
---|---|---|
committer | Keno Fischer <kfischer@college.harvard.edu> | 2015-11-06 00:12:50 +0000 |
commit | 11e0c3127ee6fa56d92191e8475ab27dc4f3a1b8 (patch) | |
tree | 27d7f9e8a6c55508a8d4675b5e4c57a84931354d /test/BugPoint | |
parent | 6e83ede607f1727d77fce8c08ff2eefb2794aa15 (diff) |
[bugpoint] Add a named metadata (+their operands) reducer
Summary:
We frequently run bugpoint on a linked module that consists of all
modules we create while jitting the julia standard library. This module
has a very large number of compile units (10000+) in `llvm.dbg.cu`,
which didn't get reduced at all, requiring manual post processing.
This is an attempt to have bugpoint go through and attempt to reduce
the number of global named metadata nodes as well as their operands,
to cut down the number of roots for such metadata.
Reviewers: dexonsmith, reames, pete
Subscribers: pete, dexonsmith, reames, llvm-commits
Differential Revision: http://reviews.llvm.org/D14043
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/BugPoint')
-rw-r--r-- | test/BugPoint/named-md.ll | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/BugPoint/named-md.ll b/test/BugPoint/named-md.ll new file mode 100644 index 00000000000..1fffa2cb978 --- /dev/null +++ b/test/BugPoint/named-md.ll @@ -0,0 +1,39 @@ +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null +; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s +; RUN-DISABLE: bugpoint -disable-namedmd-remove -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null +; RUN-DISABLE: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s +; REQUIRES: loadable_module + +; CHECK: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]]} +; CHECK-DISABLE: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]], +; CHECK-DISABLE-SAME: ![[THIRD:[0-9]+]], ![[FOURTH:[0-9]+]], ![[FIFTH:[0-9]+]]} +!llvm.dbg.cu = !{!0, !1, !2, !3, !4, !5} +; CHECK-NOT: !named +; CHECK-DISABLE: !named +!named = !{!0, !1, !2, !3, !4, !5} +; CHECK: !llvm.module.flags = !{![[DIVERSION:[0-9]+]]} +!llvm.module.flags = !{!6, !7} + +; CHECK-DAG: ![[FIRST]] = distinct !DICompileUnit(language: DW_LANG_Julia, +; CHECK-DAG: ![[SECOND]] = distinct !DICompileUnit(language: DW_LANG_Julia, +; CHECK-DAG: ![[DIVERSION]] = !{i32 2, !"Debug Info Version", i32 3} +; CHECK-DAG: !DIFile(filename: "a", directory: "b") + +; 4 nodes survive. Due to renumbering !4 should not exist +; CHECK-NOT: !4 + +!0 = distinct !DICompileUnit(language: DW_LANG_Julia, + file: !8) +!1 = distinct !DICompileUnit(language: DW_LANG_Julia, + file: !8) +!2 = distinct !DICompileUnit(language: DW_LANG_Julia, + file: !8) +!3 = distinct !DICompileUnit(language: DW_LANG_Julia, + file: !8) +!4 = distinct !DICompileUnit(language: DW_LANG_Julia, + file: !8) +!5 = distinct !DICompileUnit(language: DW_LANG_Julia, + file: !8) +!6 = !{i32 2, !"Dwarf Version", i32 2} +!7 = !{i32 2, !"Debug Info Version", i32 3} +!8 = !DIFile(filename: "a", directory: "b") |