Skip to content

Commit

Permalink
Merge pull request JuliaLang#38412 from JuliaLang/vc/llvm_passes
Browse files Browse the repository at this point in the history
Add C entry points for new Julia passes
  • Loading branch information
vchuravy committed Nov 12, 2020
2 parents e0e3921 + c5367d8 commit 5b2dffa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/llvm-julia-licm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <llvm/Transforms/Utils/LoopUtils.h>

#include "llvm-pass-helpers.h"
#include "julia.h"

#define DEBUG_TYPE "julia-licm"

Expand Down Expand Up @@ -132,3 +133,8 @@ Pass *createJuliaLICMPass()
{
return new JuliaLICMPass();
}

extern "C" JL_DLLEXPORT void LLVMExtraJuliaLICMPass(LLVMPassManagerRef PM)
{
unwrap(PM)->add(createJuliaLICMPass());
}
7 changes: 7 additions & 0 deletions src/llvm-remove-ni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <llvm/IR/LegacyPassManager.h>
#include <llvm/Support/Debug.h>

#include "julia.h"

#define DEBUG_TYPE "remove_ni"

using namespace llvm;
Expand Down Expand Up @@ -47,3 +49,8 @@ Pass *createRemoveNIPass()
{
return new RemoveNIPass();
}

extern "C" JL_DLLEXPORT void LLVMExtraAddRemoveNIPass(LLVMPassManagerRef PM)
{
unwrap(PM)->add(createRemoveNIPass());
}

0 comments on commit 5b2dffa

Please sign in to comment.