Lauri Vasama
0f04483517
Add statement rewrite pass
2025-12-05 19:53:41 +02:00
Lauri Vasama
448276915e
Add label-merging pass
2025-12-05 19:53:41 +02:00
Lauri Vasama
f2911da190
Add trivial-return-elimination pass
2025-12-05 19:53:41 +02:00
Lauri Vasama
58216deafd
Add RewriteHelpers.h
...
Contains helpers for statement rewriting.
2025-12-05 19:53:41 +02:00
Lauri Vasama
c835baf65a
Add PatternRewriter.h
...
Contains APIs from upstream LLVM that are not yet present in the current
version, as well as helpers not present in upstream.
See upstream commit 42c31d8302ff8f716601df9c276a5cd9ace6b158.
2025-12-05 19:53:41 +02:00
Lauri Vasama
ba945442d6
Add BlockStatementOp
2025-12-05 15:01:14 +02:00
Lauri Vasama
8599cc0c1d
Add StatementRegionOpInterface
...
This interface describes any operation containing statement regions.
2025-12-05 15:01:14 +02:00
Lauri Vasama
adcbdf4524
Add clift::getPrimitiveIntegerType
2025-12-05 15:01:14 +02:00
Alessandro Di Federico
1dff54ba60
Make new backend independent from the old one
2025-12-03 17:59:18 +01:00
Alessandro Di Federico
896bb8d523
Drop SegregateStackAccessesPass.h
2025-12-03 17:59:18 +01:00
Alessandro Di Federico
8f19f5292c
Minor changes
2025-12-03 17:59:18 +01:00
Pietro Fezzardi
83da56ea7a
TypeSystemPrinter: set top level IDs
...
This uses the "rank=source" feature of graphviz, that allows to select
what are the nodes with mimimal rank in a graph.
We use this to mark all the nodes that represent functions and segments
so that the graph layout is more deterministic and readable across
multiple runs when the input Model is very similar.
2025-11-28 16:05:57 +01:00
Alessandro Di Federico
bce32d9669
Default to --emit-hex-constant-literals-from=4096
2025-11-28 11:21:18 +01:00
Giacomo Vercesi
fb97693df0
Lift: implement invalidate
2025-11-26 16:13:28 +01:00
Giacomo Vercesi
b1b5778822
Add infrastructure for custom invalidation
...
Add infrastructure to pypeline to allow for pipes to provide custom
invalidation, by implementing an `invalidate` function.
2025-11-26 16:13:28 +01:00
Giacomo Vercesi
8cff10e13b
Introduce analyses that manipulate the model
...
Add 4 analyses to the pipebox that allow setting and verifying the model
and its diffs.
2025-11-26 16:13:28 +01:00
Giacomo Vercesi
2f7a055121
pypeline: convert pipe names to kebab-case
2025-11-26 16:13:28 +01:00
Giacomo Vercesi
4a1edec018
get_registry: use name for selected classes
...
Use the `name` class attribute to build the registry when discovering
subclasses of `Pipe`, `Analysis` and `Container`.
2025-11-26 14:59:43 +01:00
Giacomo Vercesi
de75d94597
{Pipe,Analysis}Run: release Python GIL
...
Move out of the `runPipe`/`runAnalysis` functions the logic that
extracts the container from the vector type. This logic is now
delegated to `containerVectorToTuple` which converts the vector type to
a tuple of references. This allows python's `run{Pipe,Analysis}` to
safely call `nanobind::gil_scoped_release` which releases the GIL for
the entire duration of the `runPipe`/`runAnalysis` execution.
2025-11-26 14:59:43 +01:00
Giacomo Vercesi
ca3c5113d9
Add recompile-isolated to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
159ca6b965
Add LinkForTranslation to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
af4b447f89
Add CompileRootModule to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
7462c2daeb
Add LinkSupport to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
d5aeb306f6
Add YieldAssembly to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
a834f874c9
Add ProcessAssembly to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
080c5017f1
Add HexDump to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
77f925c792
Add PromoteCSVs to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
a685cd1055
Add EnforceABI to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
0758a95110
Add AttachDebugInfo to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
0df05f97b7
Add Isolate to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
819538a5df
Add CollectCFG to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
cf52901d6d
Add GenerateModelTypeDefinition to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
ddb36fc70f
Add ModelToHeader to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
95365c1fb9
Add PureLLVMPasses{Root,}Pipe to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
97b471c888
Add Lift to pypeline
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
1b9fb62a33
SingleOutputPipe: relax assertion
...
Relax the assertion at the beginning of `SingleOutputPipe` that
triggered an assertion when 0 objects where requested for output.
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
5297a354ad
PipeRunPipes: automatically track progress
...
Automatically create a `Task` object when a pipe with multiple steps
(e.g. `FunctionPipe`) is run.
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
b4f9147646
Introduce LLVMFunctionsContainer
...
Add another container for LLVM modules. This one stores one
`llvm::Module` per function (all modules share the same
`llvm::LLVMContext` for performance reasons).
2025-11-18 17:47:54 +01:00
Giacomo Vercesi
a39906ca85
Factor out cloneFiltered from LLVMContainer
...
Move the body of `cloneFiltered` from `LLVMContainer` into a free
function in `IRHelpers.h`.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi
57d9c3deb8
PipeboxCommon: add Access enum
...
Add an enum to explicitly specify the `TaskArgumentAccess` of a given
`Pipe`. This is needed because in some cases it's required to manually
specify the `READ` or `WRITE` access.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi
1c07656448
pipebox.py: add initialize function
...
Add the `initialize` function to `pipebox.py`. This allows passing
command-line arguments to the pipebox.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi
153fcf2773
InitRevng: initialize LLVM components
...
In the constructor of `InitRevng` also call all the `llvm::initialize*`
functions. This is done to be less implementation-specific and having
these functions be called in
`LLVMPipelineRegistry.libraryInitialization`.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi
65ce5c1224
InitRevng: check for double initialization
...
In the constructor of `InitRevng` check that the class has only been
initialized once.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi
4f93c9e7ad
Container: add mime type
...
Add the `MimeType` field to the C++ classes. Forward it to python via
nanobind.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi
a8aa034acf
Registrars.h: fix out-of-bounds read
...
The `name` parameter of the `nanobind::class_` constructor needs to be
NULL-terminated. Copy the `StringRef` to a temporary string to add the
missing `\0`.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi
000d75dbb7
pypeline: add check_precondition to Pipe
...
Add the `check_precondition` function to the `Pipe` class. This will be
run before the actual schedule creates containers and runs itself
proper.
2025-11-17 10:04:13 +01:00
Lauri Vasama
fbc1563b43
Add loop detection pass
2025-11-12 15:28:54 +02:00
Lauri Vasama
d5d1734f5c
Add expression usage helpers
2025-11-12 15:28:54 +02:00
Lauri Vasama
cee099c2df
Rename Clift GoToOp to GotoOp
2025-11-12 15:28:54 +02:00
Lauri Vasama
220439dfce
Remove FunctionType::getCliftFunctionType
...
Change FunctionType::getFunctionType to return clift::FunctionType
instead of clift::ValueType.
2025-11-12 15:28:54 +02:00