Symbolize operand bundle blocks for bcanalyzer

Reviewers: joker.eph

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D19523

llvm-svn: 267524
This commit is contained in:
Sanjoy Das 2016-04-26 05:59:08 +00:00
parent b7db006017
commit 938a0f7381
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,27 @@
; RUN: llvm-as < %s | llvm-bcanalyzer -dump -disable-histogram | FileCheck %s
; CHECK: <OPERAND_BUNDLE_TAGS_BLOCK
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
; CHECK-NEXT: <OPERAND_BUNDLE_TAG
; CHECK-NEXT: </OPERAND_BUNDLE_TAGS_BLOCK
; CHECK: <FUNCTION_BLOCK
; CHECK: <OPERAND_BUNDLE
; CHECK: <OPERAND_BUNDLE
; CHECK-NOT: <OPERAND_BUNDLE
; CHECK: </FUNCTION_BLOCK
; CHECK: Block ID #{{[0-9]+}} (OPERAND_BUNDLE_TAGS_BLOCK)
declare void @callee0()
define void @f0(i32* %ptr) {
entry:
%l = load i32, i32* %ptr
%x = add i32 42, 1
call void @callee0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
ret void
}

View File

@ -105,6 +105,7 @@ static const char *GetBlockName(unsigned BlockID,
switch (BlockID) { switch (BlockID) {
default: return nullptr; default: return nullptr;
case bitc::OPERAND_BUNDLE_TAGS_BLOCK_ID: return "OPERAND_BUNDLE_TAGS_BLOCK";
case bitc::MODULE_BLOCK_ID: return "MODULE_BLOCK"; case bitc::MODULE_BLOCK_ID: return "MODULE_BLOCK";
case bitc::PARAMATTR_BLOCK_ID: return "PARAMATTR_BLOCK"; case bitc::PARAMATTR_BLOCK_ID: return "PARAMATTR_BLOCK";
case bitc::PARAMATTR_GROUP_BLOCK_ID: return "PARAMATTR_GROUP_BLOCK_ID"; case bitc::PARAMATTR_GROUP_BLOCK_ID: return "PARAMATTR_GROUP_BLOCK_ID";
@ -279,6 +280,7 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
STRINGIFY_CODE(FUNC_CODE, INST_CALL) STRINGIFY_CODE(FUNC_CODE, INST_CALL)
STRINGIFY_CODE(FUNC_CODE, DEBUG_LOC) STRINGIFY_CODE(FUNC_CODE, DEBUG_LOC)
STRINGIFY_CODE(FUNC_CODE, INST_GEP) STRINGIFY_CODE(FUNC_CODE, INST_GEP)
STRINGIFY_CODE(FUNC_CODE, OPERAND_BUNDLE)
} }
case bitc::VALUE_SYMTAB_BLOCK_ID: case bitc::VALUE_SYMTAB_BLOCK_ID:
switch (CodeID) { switch (CodeID) {
@ -364,6 +366,12 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
case bitc::USELIST_CODE_DEFAULT: return "USELIST_CODE_DEFAULT"; case bitc::USELIST_CODE_DEFAULT: return "USELIST_CODE_DEFAULT";
case bitc::USELIST_CODE_BB: return "USELIST_CODE_BB"; case bitc::USELIST_CODE_BB: return "USELIST_CODE_BB";
} }
case bitc::OPERAND_BUNDLE_TAGS_BLOCK_ID:
switch(CodeID) {
default: return nullptr;
case bitc::OPERAND_BUNDLE_TAG: return "OPERAND_BUNDLE_TAG";
}
} }
#undef STRINGIFY_CODE #undef STRINGIFY_CODE
} }