From 5ad07189e9322a83f324323c5aa3c1ba0dc6ee53 Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Sat, 27 Apr 2024 13:29:38 +0100 Subject: [PATCH] Update to LLVM 18 --- .github/workflows/x86-darwin.yml | 6 +- .github/workflows/x86-ubuntu.yml | 8 +-- CMakeLists.txt | 4 +- HelloWorld/CMakeLists.txt | 4 +- README.md | 100 +++++++++++++++---------------- 5 files changed, 61 insertions(+), 61 deletions(-) diff --git a/.github/workflows/x86-darwin.yml b/.github/workflows/x86-darwin.yml index e2476bde..9cadf307 100644 --- a/.github/workflows/x86-darwin.yml +++ b/.github/workflows/x86-darwin.yml @@ -27,18 +27,18 @@ jobs: - name: Install Dependencies run: | brew update - brew install llvm@17 + brew install llvm brew install lit - name: Build HelloWorld run: | cd HelloWorld mkdir build && cd build - cmake -DLT_LLVM_INSTALL_DIR="/opt/homebrew/opt/llvm@17/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ + cmake -DLT_LLVM_INSTALL_DIR="/opt/homebrew/opt/llvm/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ make -j2 - name: Build llvm-tutor + run tests run: | cd $GITHUB_WORKSPACE mkdir build && cd build - cmake -DLT_LLVM_INSTALL_DIR="/opt/homebrew/opt/llvm@17/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ + cmake -DLT_LLVM_INSTALL_DIR="/opt/homebrew/opt/llvm/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ make -j2 lit test/ diff --git a/.github/workflows/x86-ubuntu.yml b/.github/workflows/x86-ubuntu.yml index c1377bcb..4f6a4a60 100644 --- a/.github/workflows/x86-ubuntu.yml +++ b/.github/workflows/x86-ubuntu.yml @@ -25,9 +25,9 @@ jobs: CXX: ${{ matrix.compiler.CXX }} run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" + sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" sudo apt-get update - sudo apt-get install -y llvm-17 llvm-17-dev llvm-17-tools clang-17 + sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools clang-18 sudo apt-get install python3-setuptools sudo pip3 install lit - name: Build HelloWorld @@ -37,12 +37,12 @@ jobs: run: | cd HelloWorld mkdir build && cd build - cmake -DLT_LLVM_INSTALL_DIR="/usr/lib/llvm-17/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ + cmake -DLT_LLVM_INSTALL_DIR="/usr/lib/llvm-18/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ make -j2 - name: Build llvm-tutor + run tests run: | cd $GITHUB_WORKSPACE mkdir build && cd build - cmake -DLT_LLVM_INSTALL_DIR="/usr/lib/llvm-17/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ + cmake -DLT_LLVM_INSTALL_DIR="/usr/lib/llvm-18/" -DCMAKE_BUILD_TYPE=${{ matrix.type }} ../ make -j2 lit -va test/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e36a3e3..c2d726e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,8 @@ list(APPEND CMAKE_PREFIX_PATH "${LT_LLVM_INSTALL_DIR}/lib/cmake/llvm/") find_package(LLVM CONFIG) # We defer the version checking to this statement -if("${LLVM_VERSION_MAJOR}" VERSION_LESS 17) - message(FATAL_ERROR "Found LLVM ${LLVM_VERSION_MAJOR}, but need LLVM 17 or above") +if("${LLVM_VERSION_MAJOR}" VERSION_LESS 18) + message(FATAL_ERROR "Found LLVM ${LLVM_VERSION_MAJOR}, but need LLVM 18 or above") endif() message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") diff --git a/HelloWorld/CMakeLists.txt b/HelloWorld/CMakeLists.txt index 5d057f3f..3416b294 100644 --- a/HelloWorld/CMakeLists.txt +++ b/HelloWorld/CMakeLists.txt @@ -12,8 +12,8 @@ set(LT_LLVM_INSTALL_DIR "" CACHE PATH "LLVM installation directory") list(APPEND CMAKE_PREFIX_PATH "${LT_LLVM_INSTALL_DIR}/lib/cmake/llvm/") find_package(LLVM CONFIG) -if("${LLVM_VERSION_MAJOR}" VERSION_LESS 17) - message(FATAL_ERROR "Found LLVM ${LLVM_VERSION_MAJOR}, but need LLVM 17 or above") +if("${LLVM_VERSION_MAJOR}" VERSION_LESS 18) + message(FATAL_ERROR "Found LLVM ${LLVM_VERSION_MAJOR}, but need LLVM 18 or above") endif() # HelloWorld includes headers from LLVM - update the include paths accordingly diff --git a/README.md b/README.md index 1213b50b..3fa454da 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ llvm-tutor [![x86-Ubuntu](https://github.com/banach-space/llvm-tutor/actions/workflows/x86-ubuntu.yml/badge.svg?branch=main)](https://github.com/banach-space/llvm-tutor/actions/workflows/x86-ubuntu.yml) -Example LLVM passes - based on **LLVM 17** +Example LLVM passes - based on **LLVM 18** **llvm-tutor** is a collection of self-contained reference LLVM passes. It's a tutorial that targets novice and aspiring LLVM developers. Key features: @@ -57,7 +57,7 @@ For every function defined in the input module, **HelloWorld** prints its name and the number of arguments that it takes. You can build it like this: ```bash -export LLVM_DIR= +export LLVM_DIR= mkdir build cd build cmake -DLT_LLVM_INSTALL_DIR=$LLVM_DIR /HelloWorld/ @@ -97,30 +97,30 @@ Development Environment ## Platform Support And Requirements This project has been tested on **Ubuntu 22.04** and **Mac OS X 11.7**. In order to build **llvm-tutor** you will need: - * LLVM 17 + * LLVM 18 * C++ compiler that supports C++17 * CMake 3.20 or higher In order to run the passes, you will need: - * **clang-17** (to generate input LLVM files) + * **clang-18** (to generate input LLVM files) * [**opt**](http://llvm.org/docs/CommandGuide/opt.html) (to run the passes) There are additional requirements for tests (these will be satisfied by -installing LLVM 17): +installing LLVM 18): * [**lit**](https://llvm.org/docs/CommandGuide/lit.html) (aka **llvm-lit**, LLVM tool for executing the tests) * [**FileCheck**](https://llvm.org/docs/CommandGuide/FileCheck.html) (LIT requirement, it's used to check whether tests generate the expected output) -## Installing LLVM 17 on Mac OS X -On Darwin you can install LLVM 17 with [Homebrew](https://brew.sh/): +## Installing LLVM 18 on Mac OS X +On Darwin you can install LLVM 18 with [Homebrew](https://brew.sh/): ```bash -brew install llvm@17 +brew install llvm@18 ``` If you already have an older version of LLVM installed, you can upgrade it to -LLVM 17 like this: +LLVM 18 like this: ```bash brew upgrade llvm @@ -129,28 +129,28 @@ brew upgrade llvm Once the installation (or upgrade) is complete, all the required header files, libraries and tools will be located in `/opt/homebrew/opt/llvm/`. -## Installing LLVM 17 on Ubuntu +## Installing LLVM 18 on Ubuntu On Ubuntu Jammy Jellyfish, you can install modern LLVM from the official [repository](http://apt.llvm.org/): ```bash wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - -sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" +sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" sudo apt-get update -sudo apt-get install -y llvm-17 llvm-17-dev llvm-17-tools clang-17 +sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools clang-18 ``` This will install all the required header files, libraries and tools in -`/usr/lib/llvm-17/`. +`/usr/lib/llvm-18/`. -## Building LLVM 17 From Sources +## Building LLVM 18 From Sources Building from sources can be slow and tricky to debug. It is not necessary, but -might be your preferred way of obtaining LLVM 17. The following steps will work +might be your preferred way of obtaining LLVM 18. The following steps will work on Linux and Mac OS X: ```bash git clone https://github.com/llvm/llvm-project.git cd llvm-project -git checkout release/17.x +git checkout release/18.x mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_PROJECTS=clang /llvm/ @@ -166,18 +166,18 @@ You can build **llvm-tutor** (and all the provided pass plugins) as follows: ```bash cd -cmake -DLT_LLVM_INSTALL_DIR= +cmake -DLT_LLVM_INSTALL_DIR= make ``` The `LT_LLVM_INSTALL_DIR` variable should be set to the root of either the -installation or build directory of LLVM 17. It is used to locate the +installation or build directory of LLVM 18. It is used to locate the corresponding `LLVMConfig.cmake` script that is used to set the include and library paths. ## Testing In order to run **llvm-tutor** tests, you need to install **llvm-lit** (aka -**lit**). It's not bundled with LLVM 17 packages, but you can install it with +**lit**). It's not bundled with LLVM 18 packages, but you can install it with **pip**: ```bash @@ -242,7 +242,7 @@ below. LLVM passes work with LLVM IR files. You can generate one like this: ```bash -export LLVM_DIR= +export LLVM_DIR= # Textual form $LLVM_DIR/bin/clang -O1 -emit-llvm input.c -S -o out.ll # Binary/bit-code form @@ -273,7 +273,7 @@ use the `*.so` extension for pass plugins. When working on Mac OS, use ## OpcodeCounter **OpcodeCounter** is an Analysis pass that prints a summary of the [LLVM IR -opcodes](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/IR/Instruction.cpp#L397-L480) +opcodes](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/IR/Instruction.cpp#L397-L480) encountered in every function in the input module. This pass can be [run automatically](#auto-registration-with-optimisation-pipelines) with one of the pre-defined optimisation pipelines. However, let's use our tried and tested method @@ -293,7 +293,7 @@ does not modify the input IR, the output module would be identical to the input anyway. ```bash -export LLVM_DIR= +export LLVM_DIR= # Generate an LLVM file to analyze $LLVM_DIR/bin/clang -emit-llvm -c /inputs/input_for_cc.c -o input_for_cc.bc # Run the pass through opt @@ -353,7 +353,7 @@ We will use to test **InjectFuncCall**: ```bash -export LLVM_DIR= +export LLVM_DIR= # Generate an LLVM file to analyze $LLVM_DIR/bin/clang -O0 -emit-llvm -c /inputs/input_for_hello.c -o input_for_hello.bc # Run the pass through opt @@ -424,7 +424,7 @@ We will use to test **StaticCallCounter**: ```bash -export LLVM_DIR= +export LLVM_DIR= # Generate an LLVM file to analyze $LLVM_DIR/bin/clang -emit-llvm -c /inputs/input_for_cc.c -o input_for_cc.bc # Run the pass through opt @@ -478,7 +478,7 @@ We will use to test **DynamicCallCounter**: ```bash -export LLVM_DIR= +export LLVM_DIR= # Generate an LLVM file to analyze $LLVM_DIR/bin/clang -emit-llvm -c /inputs/input_for_cc.c -o input_for_cc.bc # Instrument the input file @@ -544,7 +544,7 @@ We will use to test **MBASub**: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S /inputs/input_for_mba_sub.c -o input_for_sub.ll $LLVM_DIR/bin/opt -load-pass-plugin=/lib/libMBASub.so -passes="mba-sub" -S input_for_sub.ll -o out.ll ``` @@ -566,7 +566,7 @@ We will use to test **MBAAdd**: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -O1 -emit-llvm -S /inputs/input_for_mba.c -o input_for_mba.ll $LLVM_DIR/bin/opt -load-pass-plugin=/lib/libMBAAdd.so -passes="mba-add" -S input_for_mba.ll -o out.ll ``` @@ -594,7 +594,7 @@ We will use to test **RIV**: ```bash -export LLVM_DIR= +export LLVM_DIR= # Generate an LLVM file to analyze $LLVM_DIR/bin/clang -emit-llvm -S -O1 /inputs/input_for_riv.c -o input_for_riv.ll # Run the pass through opt @@ -695,7 +695,7 @@ LEGEND: ``` As depicted above, **DuplicateBB** replaces qualifying basic blocks with 4 new basic blocks. This is implemented through LLVM's -[SplitBlockAndInsertIfThenElse](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h#L471). +[SplitBlockAndInsertIfThenElse](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h#L471). **DuplicateBB** does all the necessary preparation and clean-up. In other words, it's an elaborate wrapper for LLVM's `SplitBlockAndInsertIfThenElse`. @@ -706,7 +706,7 @@ This pass depends on the **RIV** pass, which also needs be loaded in order for as our sample input. First, generate the LLVM file: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S -O1 /inputs/input_for_duplicate_bb.c -o input_for_duplicate_bb.ll ``` @@ -826,7 +826,7 @@ It is really interesting to see the effect of **MergeBB** on the output from **DuplicateBB**. Let's start with the same input as we used for **DuplicateBB**: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S -O1 /inputs/input_for_duplicate_bb.c -o input_for_duplicate_bb.ll ``` @@ -874,7 +874,7 @@ We will use [input_for_fcmp_eq.ll](https://github.com/banach-space/llvm-tutor/bl to test **FindFCmpEq**: ```bash -export LLVM_DIR= +export LLVM_DIR= # Generate the input file $LLVM_DIR/bin/clang -emit-llvm -S -Xclang -disable-O0-optnone -c /inputs/input_for_fcmp_eq.c -o input_for_fcmp_eq.ll # Run the pass @@ -904,7 +904,7 @@ As with [**FindFCmpEq**](#FindFCmpEq), we will use to test **ConvertFCmpEq**: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S -Xclang -disable-O0-optnone \ -c /inputs/input_for_fcmp_eq.c -o input_for_fcmp_eq.ll $LLVM_DIR/bin/opt --load-pass-plugin /lib/libFindFCmpEq.so \ @@ -958,7 +958,7 @@ and macros. For example, for **MBAAdd**: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S -O1 /inputs/input_for_mba.c -o input_for_mba.ll $LLVM_DIR/bin/opt -S -load-pass-plugin /lib/libMBAAdd.so -passes=mba-add input_for_mba.ll -debug-only=mba-add -stats -o out.ll ``` @@ -989,7 +989,7 @@ The default debugger on OS X is [LLDB](http://lldb.llvm.org). You will normally use it like this: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S -O1 /inputs/input_for_mba.c -o input_for_mba.ll lldb -- $LLVM_DIR/bin/opt -S -load-pass-plugin /lib/libMBAAdd.dylib -passes=mba-add input_for_mba.ll -o out.ll (lldb) breakpoint set --name MBAAdd::run @@ -998,7 +998,7 @@ lldb -- $LLVM_DIR/bin/opt -S -load-pass-plugin /lib/libMBAAdd.dylib - or, equivalently, by using LLDBs aliases: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S -O1 /inputs/input_for_mba.c -o input_for_mba.ll lldb -- $LLVM_DIR/bin/opt -S -load-pass-plugin /lib/libMBAAdd.dylib -passes=mba-add input_for_mba.ll -o out.ll (lldb) b MBAAdd::run @@ -1011,7 +1011,7 @@ On most Linux systems, [GDB](https://www.gnu.org/software/gdb/) is the most popular debugger. A typical session will look like this: ```bash -export LLVM_DIR= +export LLVM_DIR= $LLVM_DIR/bin/clang -emit-llvm -S -O1 /inputs/input_for_mba.c -o input_for_mba.ll gdb --args $LLVM_DIR/bin/opt -S -load-pass-plugin /lib/libMBAAdd.so -passes=mba-add input_for_mba.ll -o out.ll (gdb) b MBAAdd.cpp:MBAAdd::run @@ -1024,14 +1024,14 @@ Analysis vs Transformation Pass The implementation of a pass depends on whether it is an Analysis or a Transformation pass: -* a transformation pass will normally inherit from [PassInfoMixin](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/include/llvm/IR/PassManager.h#L371), -* an analysis pass will inherit from [AnalysisInfoMixin](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/include/llvm/IR/PassManager.h#L394). +* a transformation pass will normally inherit from [PassInfoMixin](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/include/llvm/IR/PassManager.h#L371), +* an analysis pass will inherit from [AnalysisInfoMixin](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/include/llvm/IR/PassManager.h#L394). This is one of the key characteristics of the New Pass Managers - it makes the split into Analysis and Transformation passes very explicit. An Analysis pass requires a bit more bookkeeping and hence a bit more code. For example, you need to add an instance of -[AnalysisKey](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/include/llvm/IR/PassManager.h#L410) +[AnalysisKey](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/include/llvm/IR/PassManager.h#L410) so that it can be identified by the New Pass Manager. Note that for small standalone examples, the difference between Analysis and @@ -1135,13 +1135,13 @@ examples. | Name | Description | Test files in llvm-tutor | |-----------|-----------------|--------------------------| -|[**dce**](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/Scalar/DCE.cpp) | Dead Code Elimination | [dce.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/dce.ll) | -|[**memcpyopt**](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp) | Optimise calls to `memcpy` (e.g. replace them with `memset`) | [memcpyopt.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/memcpyopt.ll) | -|[**reassociate**](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/Scalar/Reassociate.cpp) | Reassociate (e.g. 4 + (x + 5) -> x + (4 + 5)). This enables further optimisations, e.g. LICM. | [reassociate.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/reassociate.ll) | -|[**always-inline**](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/IPO/AlwaysInliner.cpp) | Always inlines functions decorated with [`alwaysinline`](https://llvm.org/docs/LangRef.html#function-attributes) | [always-inline.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/always-inline.ll) | -|[**loop-deletion**](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/Scalar/LoopDeletion.cpp) | Delete unused loops | [loop-deletion.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/loop-deletion.ll) | -|[**licm**](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/Scalar/LICM.cpp) | [Loop-Invariant Code Motion](https://en.wikipedia.org/wiki/Loop-invariant_code_motion) (a.k.a. LICM) | [licm.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/licm.ll) | -|[**slp**](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp) | [Superword-level parallelism vectorisation](https://llvm.org/docs/Vectorizers.html#the-slp-vectorizer) | [slp\_x86.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/slp_x86.ll), [slp\_aarch64.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/slp_aarch64.ll) | +|[**dce**](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/Scalar/DCE.cpp) | Dead Code Elimination | [dce.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/dce.ll) | +|[**memcpyopt**](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp) | Optimise calls to `memcpy` (e.g. replace them with `memset`) | [memcpyopt.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/memcpyopt.ll) | +|[**reassociate**](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/Scalar/Reassociate.cpp) | Reassociate (e.g. 4 + (x + 5) -> x + (4 + 5)). This enables further optimisations, e.g. LICM. | [reassociate.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/reassociate.ll) | +|[**always-inline**](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/IPO/AlwaysInliner.cpp) | Always inlines functions decorated with [`alwaysinline`](https://llvm.org/docs/LangRef.html#function-attributes) | [always-inline.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/always-inline.ll) | +|[**loop-deletion**](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/Scalar/LoopDeletion.cpp) | Delete unused loops | [loop-deletion.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/loop-deletion.ll) | +|[**licm**](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/Scalar/LICM.cpp) | [Loop-Invariant Code Motion](https://en.wikipedia.org/wiki/Loop-invariant_code_motion) (a.k.a. LICM) | [licm.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/licm.ll) | +|[**slp**](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp) | [Superword-level parallelism vectorisation](https://llvm.org/docs/Vectorizers.html#the-slp-vectorizer) | [slp\_x86.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/slp_x86.ll), [slp\_aarch64.ll](https://github.com/banach-space/llvm-tutor/blob/main/test/llvm/slp_aarch64.ll) | This list focuses on [LLVM's transform passes](https://llvm.org/docs/Passes.html#transform-passes) that are relatively @@ -1172,11 +1172,11 @@ Piovezan, EuroLLVM, ([slides](https://llvm.org/devmtg/2019-04/slides/Tutorial-Br * _"Mapping High Level Constructs to LLVM IR"_, M. Rodler ([link](https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/)) * **Examples in LLVM** * Control Flow Graph simplifications: - [llvm/examples/IRTransforms/](https://github.com/llvm/llvm-project/tree/release/17.x/llvm/examples/IRTransforms) + [llvm/examples/IRTransforms/](https://github.com/llvm/llvm-project/tree/release/18.x/llvm/examples/IRTransforms) * Hello World Pass: - [llvm/lib/Transforms/Hello/](https://github.com/llvm/llvm-project/blob/release/17.x/llvm/lib/Transforms/Hello) + [llvm/lib/Transforms/Hello/](https://github.com/llvm/llvm-project/blob/release/18.x/llvm/lib/Transforms/Hello) * Good Bye World Pass: - [llvm/examples/Bye/](https://github.com/llvm/llvm-project/tree/release/17.x/llvm/examples/Bye) + [llvm/examples/Bye/](https://github.com/llvm/llvm-project/tree/release/18.x/llvm/examples/Bye) * **LLVM Pass Development** * _"Writing an LLVM Optimization"_, Jonathan Smith [video](https://www.youtube.com/watch?v=MagR2KY8MQI&t) * _"Getting Started With LLVM: Basics "_, J. Paquette, F. Hahn, LLVM Dev Meeting 2019 [video](https://www.youtube.com/watch?v=3QQuhL-dSys&t=826s)