numba / numba/llvmlite

Writing custom passes with FunctionPassManager or ModulePassManager

Open
#92 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.3k
Forks
372
Avg merge
3d 2h
Merged PRs (30d)
10

Description

The current examples and the documentation is not very clear on the use/purpose of the 2 pass managers. I see that they operate on the actual llvm module generated and not the textual version. However, without access to the underlying llvm types its difficult to write custom passes. This probably doesn't fall under the numba's needs I guess but I was wondering if there was indeed a way for this.
Otherwise is the original llvmpy better suited for this kind of behavior (although depricated).

https://gist.github.com/ssarangi/

Update:
After thinking about this for sometime I was wondering if this is already supported by the text ir interface ? If not it should be relatively easy to support this rather than exposing actual llvm variables through the api isn't it ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the examples and documentation for FunctionPassManager and ModulePassManager, then review the linked gist and the text IR interface question. Determine whether custom passes can be supported through text IR or require exposing underlying LLVM types; done means the supported approach and its scope are clearly documented or specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.