mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:19:43 +00:00
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:
parent
b7db006017
commit
938a0f7381
27
test/Bitcode/operand-bundles-bc-analyzer.ll
Normal file
27
test/Bitcode/operand-bundles-bc-analyzer.ll
Normal 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
|
||||
}
|
@ -105,6 +105,7 @@ static const char *GetBlockName(unsigned BlockID,
|
||||
|
||||
switch (BlockID) {
|
||||
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::PARAMATTR_BLOCK_ID: return "PARAMATTR_BLOCK";
|
||||
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, DEBUG_LOC)
|
||||
STRINGIFY_CODE(FUNC_CODE, INST_GEP)
|
||||
STRINGIFY_CODE(FUNC_CODE, OPERAND_BUNDLE)
|
||||
}
|
||||
case bitc::VALUE_SYMTAB_BLOCK_ID:
|
||||
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_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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user