LLVM-Examples
LLVM Examples and Code samples. LLVM Passes. Based on llvm-project
Installing from Docker
Check build
commands in the Dockerfile
for more information
on installing LLVM
on local machine.
$ docker build -f DockerFile -t prodrelworks/llvm-examples:latest .
$ docker run --name llvm-examples --ulimit stack=10000000:10000000 \
--cpus=4 --memory=20g -it prodrelworks/llvm-examples:latest
Examples & Implementations :
- llvm::LoopInfo in the runOnModule
- Analysing CFGs with LLVM
- A tutorial on how to write a compiler using LLVM
References & Links :
-
Legacy Pass Example : See
folder
. -
New LLVM Pass Manager :
-
For function paraments as operands, you can get it get it via Function Argumentslist()
-
Some other differences are listed here. Even C++ one is quadratic probed.
-
Where is "emit-llvm"? ASMWritter
AsmWritter.cpp
. -
LLVM Data Structures
: -
LLVM RTTI
: -
Inspection & Traversal over
CFG
inIR
: