Skip to content

Commit 8fe7abe

Browse files
committed
[DOCS] Reference pass plugin
1 parent 930ff2b commit 8fe7abe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This repository contains:
88

99
- \subpage tpde-main "TPDE": the core compiler framework.
1010
- \ref tpde-encodegen "TPDE-Encodegen": a utility for easing the use of TPDE by deriving code generators through LLVM's Machine IR.
11-
- \subpage tpde-llvm-main "TPDE-LLVM": a standalone back-end for LLVM-IR, which compiles 10--20x faster than LLVM -O0 with similar code quality, usable as library (e.g., for JIT), as tool (`tpde-llc`), and integrated in Clang/Flang (with a patch).
11+
- \subpage tpde-llvm-main "TPDE-LLVM": a standalone back-end for LLVM-IR, which compiles 10--20x faster than LLVM -O0 with similar code quality, usable as library (e.g., for JIT), as tool (`tpde-llc`), and integrated in Clang/Flang 22+ as a plugin (`-fpass-plugin=tpde-plugin.so`).
1212

1313
### Getting Started
1414

docs/tpde-llvm/main.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ Note that compilation is likely to modify the module. All constant expressions i
2323
2424
## Integration Into Clang/Flang
2525
26-
We provide a patch to integrate TPDE-LLVM into Clang/Flang. Apply the patch from the root directory of the repository and add this repository under `clang/lib/CodeGen/tpde2` (e.g., via a symlink). This adds two options to the `clang` and `flang` drivers:
26+
For **Clang/Flang 22+**, TPDE can be used by adding the Clang/Flang command line option `-fpass-plugin=/path/to/tpde-plugin.so`. The TPDE plugin will substitute the regular LLVM back-end with the TPDE-LLVM back-end. Inputs that TPDE can't handle will cause a fall back to LLVM and emit a warning; this warning can be converted into an error using `-Werror=backend-plugin`. (Note: the LLVM version used for building TPDE *must* match the version of Clang/Flang.)
27+
28+
For **Clang/Flang 19—21**, TPDE-LLVM can be integrated using a patch. Apply the patch from the root directory of the repository and add this repository under `clang/lib/CodeGen/tpde2` (e.g., via a symlink). This adds two options to the `clang` and `flang` drivers:
2729
2830
- `-ftpde`: Use TPDE instead of the regular LLVM back-end. Inputs that TPDE can't handle will cause a fall back to LLVM and emit a warning.
2931
- `-ftpde-abort`: Abort when the input is not supported, don't fallback to LLVM.

0 commit comments

Comments
 (0)