Skip to content

Commit

Permalink
Formatted.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatki committed Sep 19, 2024
1 parent 83f20f6 commit fd0ed97
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/c/weaver/weave/perfflow_weave_new_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ bool NewWeavingPass::runOnModule(Module &M)
outs() << "NewWeavePass loaded successfully. \n";
errs() << "NewWeavePass had some error. \n";

// The following loops through each function. This is where we need to check annotation
// The following loops through each function. This is where we need to check annotation
// (from doInitialization in the legacy pass and add the insertBefore/insertAfter)
// for (auto &F : M)
// {
Expand Down Expand Up @@ -74,7 +74,7 @@ PreservedAnalyses NewWeavingPass::run(llvm::Module &M,
bool Changed = runOnModule(M);

return (Changed ? llvm::PreservedAnalyses::none()
: llvm::PreservedAnalyses::all());
: llvm::PreservedAnalyses::all());
}

// Register the new pass.
Expand All @@ -84,20 +84,20 @@ PreservedAnalyses NewWeavingPass::run(llvm::Module &M,
llvm::PassPluginLibraryInfo getNewWeavingPassPluginInfo()
{
return {LLVM_PLUGIN_API_VERSION, "inject-func-call", LLVM_VERSION_STRING,
[](PassBuilder &PB)
[](PassBuilder & PB)
{
PB.registerPipelineParsingCallback(
[](StringRef Name, ModulePassManager & MPM,
ArrayRef<PassBuilder::PipelineElement>)
{
if (Name == "new-weaving-pass")
{
PB.registerPipelineParsingCallback(
[](StringRef Name, ModulePassManager &MPM,
ArrayRef<PassBuilder::PipelineElement>)
{
if (Name == "new-weaving-pass")
{
MPM.addPass(NewWeavingPass());
return true;
}
return false;
});
}};
MPM.addPass(NewWeavingPass());
return true;
}
return false;
});
}};
}

extern "C" LLVM_ATTRIBUTE_WEAK ::llvm::PassPluginLibraryInfo
Expand Down

0 comments on commit fd0ed97

Please sign in to comment.