6,582 questions
0
votes
0
answers
11
views
LLVM Pass: How to correctly use TargetIRAnalysis with getResult() in new PM (PassManager)?
I'm trying to develop a custom LLVM obfuscation pass using the new PassManager (NPM) infrastructure.
In my pass, I need to access TargetIRAnalysis (or TargetTransformInfo) by calling getResult(F).
...
0
votes
0
answers
16
views
How to handle MLIR assembly formats for two variadic inputs
I am currently trying to build an operation for matrix multiplication in my custom MLIR dialect. I've declared the operation in a .td file and I mean for it to handle two sets of variadic inputs but I ...
0
votes
0
answers
15
views
How to get LLVM function with correct function type?
I am new to LLVM, and I am using LLVM as the backend to my own compiler. Suppose I have the following struct type and a function:
// a POD struct type
struct type_fp32 {
float a;
float b;
...
1
vote
0
answers
36
views
How to make a custom LLVM analysis for custom passes in the new pass manager?
I'm trying to write a function analysis whose results are accessible by a few custom passes in LLVM that work on functions and loops in the new pass manager. Unfortunately documentation for the new ...
1
vote
1
answer
107
views
How can I get LLVM loop vectorization debug output in Numba?
I'm trying to view LLVM debug messages for loop vectorization using Numba and llvmlite. I want to see the loop vectorization "LV:" debug output (e.g., messages like LV: Checking a loop in ......
1
vote
0
answers
25
views
Cross platform exceptions in llvm jit
I'm trying to implement exceptions in a language with llvm jit, Well not exceptions really but a panic system, that unwinds the stack to specific point and destroys local variables, I chose to use ...
1
vote
1
answer
64
views
Why is libc++ not a dynamic executable like libstdc++?
I stumbled across this when building clang and gcc from source. libstdc++ seems to be dynamically linked while libc++ is not. Why is this the case? Does it mean libc++ has glibc and glib statically ...
0
votes
1
answer
55
views
LLVM cmake build fails, giving "FAILED: lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86WinEHState.cpp.o" error
I am new to LLVM and want to write analysis / transformation passes in LLVM.
My iMac configurations are:
Chip : M1
Memory : 16 GB
macOS : Sonoma 14.4.1
I am trying to build llvm-clang for the first ...
0
votes
0
answers
47
views
Cannot build llvm on windows
I am trying to build llvm from source following their instructions under the using visual studio section. When I run the command cmake -DLLVM_ENABLE_PROJECTS=clang -G "Visual Studio 17 2022&...
0
votes
0
answers
39
views
Using llvm::ArrayRef with initializer list causes ASAN violation. What's going on?
The following code snippit shows 3 different approaches for creating a mlir::RankedTensorType. When running the program using -fsanitize=address, the first two methods work correctly. The third ...
0
votes
0
answers
21
views
LLVM ORC JIT Issues
I'm having issues getting the LLVM ORC JIT API to work properly with my project. This is my code (running LLVM 18.1.8):
class Jit
{
private:
ExecutionSession _executionSession;
...
0
votes
1
answer
24
views
Segfault in LLVM
EDIT: Figured it out. See answer below.
I have the following short LLVM program that is resulting in a segfault. I'm hoping someone can either tell me why or tell me how I can find out.
This is a ...
1
vote
0
answers
71
views
Can you wrap NumPy functions in Numba-jitted code using llvmlite?
This is a follow up question to:
How to wrap NumPy functions in Numba-jitted code with persistent disk caching?
Background:
In general Numba's implementations of Numpy functions are pretty efficient. ...
0
votes
0
answers
58
views
Specify Include directory path with llvm build
Trying to set the include directory path for llvm build
Hi,
I am trying to build llvm with snmalloc allocator and as per the cmake options and instructions, I have set LLVM_INTEGRATED_CRT_ALLOC flag ...
0
votes
2
answers
60
views
Compiler Optimizations Are Not Applied [closed]
I try to see the effects of individual compiler optimizations on the execution time of programs. For this, I use a simple matrix addition program.
When I compile the program with some different ...