[llvm] r267524 - Symbolize operand bundle blocks for bcanalyzer
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 22:59:10 PDT 2016
Author: sanjoy
Date: Tue Apr 26 00:59:08 2016
New Revision: 267524
URL: http://llvm.org/viewvc/llvm-project?rev=267524&view=rev
Log:
Symbolize operand bundle blocks for bcanalyzer
Reviewers: joker.eph
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19523
Added:
llvm/trunk/test/Bitcode/operand-bundles-bc-analyzer.ll
Modified:
llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
Added: llvm/trunk/test/Bitcode/operand-bundles-bc-analyzer.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/operand-bundles-bc-analyzer.ll?rev=267524&view=auto
==============================================================================
--- llvm/trunk/test/Bitcode/operand-bundles-bc-analyzer.ll (added)
+++ llvm/trunk/test/Bitcode/operand-bundles-bc-analyzer.ll Tue Apr 26 00:59:08 2016
@@ -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
+}
Modified: llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp?rev=267524&r1=267523&r2=267524&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp (original)
+++ llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Tue Apr 26 00:59:08 2016
@@ -105,6 +105,7 @@ static const char *GetBlockName(unsigned
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
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
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
}
More information about the llvm-commits
mailing list