[PATCH] D86900: [BitCodeAnalyzer] Add a few missing TYPE_CODES and MODULE_CODE_COMDAT to GetCodeName
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 15:44:27 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa184c758b77d: [BitCodeAnalyzer] Add a few missing TYPE_CODES and MODULE_CODE_COMDAT to… (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86900/new/
https://reviews.llvm.org/D86900
Files:
llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
llvm/test/Bitcode/bcanalyzer-comdat.ll
llvm/test/Bitcode/bcanalyzer-types.ll
Index: llvm/test/Bitcode/bcanalyzer-types.ll
===================================================================
--- /dev/null
+++ llvm/test/Bitcode/bcanalyzer-types.ll
@@ -0,0 +1,25 @@
+; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s
+
+; CHECK: Block ID {{.*}} (TYPE_BLOCK_ID)
+; CHECK: BFLOAT
+; CHECK: TOKEN
+; CHECK: X86_MMX
+; CHECK: HALF
+; CHECK: Block ID
+
+define half @test_half(half %x, half %y) {
+ %a = fadd half %x, %y
+ ret half %a
+}
+
+define x86_mmx @test_mmx(<2 x i32> %x) {
+ %a = bitcast <2 x i32> %x to x86_mmx
+ ret x86_mmx %a
+}
+
+define bfloat @test_bfloat(i16 %x) {
+ %a = bitcast i16 %x to bfloat
+ ret bfloat %a
+}
+
+declare void @llvm.token(token)
Index: llvm/test/Bitcode/bcanalyzer-comdat.ll
===================================================================
--- /dev/null
+++ llvm/test/Bitcode/bcanalyzer-comdat.ll
@@ -0,0 +1,5 @@
+; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s
+
+; CHECK: <COMDAT
+$comdat.any = comdat any
+ at comdat.any = global i32 0, comdat
Index: llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
+++ llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
@@ -135,6 +135,7 @@
STRINGIFY_CODE(MODULE_CODE, FUNCTION)
STRINGIFY_CODE(MODULE_CODE, ALIAS)
STRINGIFY_CODE(MODULE_CODE, GCNAME)
+ STRINGIFY_CODE(MODULE_CODE, COMDAT)
STRINGIFY_CODE(MODULE_CODE, VSTOFFSET)
STRINGIFY_CODE(MODULE_CODE, METADATA_VALUES_UNUSED)
STRINGIFY_CODE(MODULE_CODE, SOURCE_FILENAME)
@@ -176,16 +177,20 @@
STRINGIFY_CODE(TYPE_CODE, OPAQUE)
STRINGIFY_CODE(TYPE_CODE, INTEGER)
STRINGIFY_CODE(TYPE_CODE, POINTER)
+ STRINGIFY_CODE(TYPE_CODE, HALF)
STRINGIFY_CODE(TYPE_CODE, ARRAY)
STRINGIFY_CODE(TYPE_CODE, VECTOR)
STRINGIFY_CODE(TYPE_CODE, X86_FP80)
STRINGIFY_CODE(TYPE_CODE, FP128)
STRINGIFY_CODE(TYPE_CODE, PPC_FP128)
STRINGIFY_CODE(TYPE_CODE, METADATA)
+ STRINGIFY_CODE(TYPE_CODE, X86_MMX)
STRINGIFY_CODE(TYPE_CODE, STRUCT_ANON)
STRINGIFY_CODE(TYPE_CODE, STRUCT_NAME)
STRINGIFY_CODE(TYPE_CODE, STRUCT_NAMED)
STRINGIFY_CODE(TYPE_CODE, FUNCTION)
+ STRINGIFY_CODE(TYPE_CODE, TOKEN)
+ STRINGIFY_CODE(TYPE_CODE, BFLOAT)
}
case bitc::CONSTANTS_BLOCK_ID:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86900.297707.patch
Type: text/x-patch
Size: 2376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201012/ef0a31c4/attachment.bin>
More information about the llvm-commits
mailing list