GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codersguild/LLVM-Examples: LLVM Repository and Code samples. LLVM Passes and quick bytes.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

53 Commits
53 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ClangAST
ClangAST
 
 
LLVM Slides
LLVM Slides
 
 
LLVMIRModify
LLVMIRModify
 
 
LegacyPassExample
LegacyPassExample
 
 
NewPMExample
NewPMExample
 
 
.clang-format
.clang-format
 
 
.gitignore
.gitignore
 
 
DockerFile
DockerFile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
install.sh
install.sh
 
 

Repository files navigation

LLVM-Examples

LLVM Examples and Code samples. LLVM Passes. Based on llvm-project

# llvm cmake
cmake -G "Ninja" build \
  -DLLVM_ENABLE_PROJECTS="llvm;compiler-rt;clang;clang-tools-extra" \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_ASSERTIONS=ON \
  -DLLVM_CCACHE_BUILD=OFF \
  -DLLVM_BUILD_TESTS=ON \
  -DLLVM_INSTALL_UTILS=ON \
  -B build -S llvm

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 :

  • LLVM Get Started

  • Learning Compilers

  • Learning Compilers/LLVM: How to start?

  • LLVM-12 Book

  • LLVM Passes

  • LLVM GitHub Monorepo

  • Clang AST LLVM

  • Legacy Pass Example : See folder.

    • LLVM : What is a pass? Legacy Pass Example
  • New LLVM Pass Manager :

    • LLVM : New Pass Manager
    • LLVM : Writing a new pass
  • For function paraments as operands, you can get it get it via Function Argumentslist()

    • Function Parameters LLVM Function
    • Value Reference
    • User class : for getnumoperands, getoperands
  • Some other differences are listed here. Even C++ one is quadratic probed.

    • https://llvm.org/docs/ProgrammersManual.html#llvm-adt-densemap-h
  • Where is "emit-llvm"? ASMWritter AsmWritter.cpp.

    • https://github.com/llvm-mirror/llvm/blob/master/tools/gold/gold-plugin.cpp#L232
    • https://www.cs.cornell.edu/~asampson/blog/llvm.html
  • LLVM Data Structures :

    • https://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-for-a-task
  • LLVM RTTI :

    • https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html#id1
  • Inspection & Traversal over CFG in IR :

    • Inspection & Traversal Routines over CFG
    • LLVM : Making simple manipulations

About

LLVM Repository and Code samples. LLVM Passes and quick bytes.

hub.docker.com/r/prodrelworks/llvm-examples

Topics

ccppllvmllvm-clangtalks

Resources

Readme
GPL-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.