Skip to content

Commit

Permalink
Debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatki committed Sep 26, 2024
1 parent 58d71e9 commit ebb9067
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/c/weaver/weave/perfflow_weave_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

bool WeaveCommon::modifyAnnotatedFunctions(Module &m)
{
auto annotations = m.getNamedGlobal("llvm.global.annotations");
outs() << "I am in modifyAnnotatedFunctions \n";

auto annotations = m.getNamedGlobal("llvm.global.annotations");
if (!annotations)
{
return false;
Expand All @@ -28,12 +30,14 @@ bool WeaveCommon::modifyAnnotatedFunctions(Module &m)

if (annotations.getNumOperands() > 0)
{
outs() << "I have %d operands!" << annotations.getNumOperands() << "\n";
outs() << "I have %d operands!" << annotations.getNumOperands() << "\n";
auto a = cast<ConstantArray> (annotations->getOperand(0));
}
else
{
outs() << "I have failed as there are no operands!\n";
return changed;

}

for (unsigned int i = 0; i < a->getNumOperands(); i++)
{
Expand Down

0 comments on commit ebb9067

Please sign in to comment.