3016 Commits

Author SHA1 Message Date
Lauri Vasama 37b8cc7771 Add MutableStringAttr 2025-09-29 18:05:54 +03:00
Lauri Vasama 94ba300f2d Add inherent handle attributes on local and label 2025-09-29 18:05:54 +03:00
Lauri Vasama b1b6a0e93c Add Location conversion utilities 2025-09-29 18:05:54 +03:00
Lauri Vasama 375d40fc59 Move CTarget.h under revng/Support 2025-09-29 18:05:54 +03:00
Lauri Vasama eb45307fb4 Fix pipeline::Location::back 2025-09-29 18:05:54 +03:00
Andrea Gussoni 855a9309ec MaterializeLoopScopes: drop pass
Drop the `MaterializeLoopScopes` pass after the re-design the loop
matching stage to work entirely on `clift`, without the need to insert a
`scope_closer` edge to guide the emission.

Simultaneously, drop the DAGify `Head` metadata insertion, since it will
not be checked anymore during the `MaterializeLoopScopes` pass.
2025-09-26 10:39:09 +02:00
Andrea Gussoni 92e8ec3982 ScopeGraphUtils: improve isDAG check
We now ensure that even in case of blocks disconnected from the entry,
the `isDAG` function still search for loops in such parts of the graph.

This is achieved by instantiating multiple `scc_iterator` on the blocks
composing the underlying `Graph`.
2025-09-26 10:39:09 +02:00
Andrea Gussoni 08781ab2a6 GraphAlgorithms: hasUnreachableBlocks helper
Introduce the `hasUnreachableBlocks`, which can be used to test that
blocks disconnected from the entry of the `GraphT` do not exists.
2025-09-24 15:51:06 +02:00
Andrea Gussoni 817c5c0e23 GraphAlgorithms: propagate template arguments 2025-09-24 15:51:02 +02:00
Giacomo Vercesi 448f70e7dc Add trace runner
Add the tool `pypeline-trace-runner` which allows reading a serialized
pypeline schedule and execute it purely in C++.
2025-09-17 14:09:16 +02:00
Giacomo Vercesi 688b9fe111 Introduce compatibility with revng-pypeline
Add the necessary machinery to allow `Pipe`s, `Analysis`es,
`Container`s, `Model` and `ObjectID` to be implemented in C++ and used
by Python.
2025-09-17 14:02:40 +02:00
Giacomo Vercesi c68b7f1ab6 TupleTreeGenerator: make all keys hashable
Make all `Key` structs generated by TupleTreeGenerator have a
`std::hash` specicialization.
2025-09-17 14:02:40 +02:00
Giacomo Vercesi 5f5d2da842 check-conventions: check CMakeLists.txt license
The `check-conventions` script inadvertently ignored checking the
license header in `CMakeLists.txt`. Change the script so that those are
checked. Also add the missing headers to the reported files.
2025-09-17 14:02:40 +02:00
Ivan Krysak 385cbfb13a Introduce ModuleSlotTracker-aware dumpToString 2025-09-10 17:44:02 +02:00
Ivan Krysak 4d35551f14 Introduce a debug information preservation style
It's guarded behind the
`EnableStrictDebugInformationPreservationStyle`
option.
2025-09-10 17:44:02 +02:00
Ivan Krysak f1ee21c2cd Introduce isDebugLocationInvalid helper 2025-09-10 17:44:01 +02:00
Ivan Krysak 2ad2cbda6f setInsertPointToFirstNonAlloca: preserve DebugLoc 2025-09-10 17:44:01 +02:00
Andrea Gussoni d010ab806d MLoopScopes: introduce pass
The `MaterializeLoopScopes` is a scope-inducing transformation, with the
goal of inserting a `scope_closer` edge targeting the immediate post
dominator, outside each `GenericRegion`, in order to materialize the
scope representing the body of each `GenericRegion` on the `ScopeGraph`.
2025-09-10 13:36:09 +02:00
Andrea Gussoni fbd8c827e1 ScopeGraph: move helper functions
Move the `replaceSuccessors` and `simplifyTerminator` helper in the
`ScopeGraphUtils` library.
2025-09-10 13:36:08 +02:00
Andrea Gussoni f0ef0947a2 GenericRegion: fix getParent return type 2025-09-10 13:36:08 +02:00
Andrea Gussoni 53b756d169 GenericRegionPass: run on the ScopeGraph 2025-09-10 13:36:08 +02:00
Giacomo Vercesi c2afb05049 VerifyHelper: set ReasonBuffer with simple str
When using `maybeFail(bool, llvm::Twine)` the `ReasonBuffer` variable
was not being set, leading sometimes to the verify reason being an empty
string.
2025-09-09 12:27:33 +02:00
Giacomo Vercesi eba55456f6 NameBuilder: fix a use-after-free bug 2025-09-08 16:33:51 +02:00
Ivan Krysak cd7f3f8ffd ModelCBuilder: rework handling of padding fields 2025-09-04 16:57:16 +03:00
Ivan Krysak c80309088a NameBuilder: add shouldUseAutomaticName method
It provides a way to dynamically check whether a custom name is
going to be emitted for a specific entity or not.
2025-09-04 16:57:16 +03:00
Ivan Krysak 3eea4c4094 Always emit _SIZE on struct definitions 2025-09-04 16:57:12 +03:00
Ivan Krysak c6a175a1b9 Rename _START_AT -> _STARTS_AT 2025-08-29 14:00:29 +03:00
Ivan Krysak 03b8d29cb9 CFG: introduce flat per-line padding 2025-07-24 13:31:29 +03:00
Ivan Krysak 0db801b439 CFG: ignore empty lines at the ends of blocks 2025-07-24 13:31:29 +03:00
Ivan Krysak f6970ff70a TypeNames: fix function prototype return value tag 2025-07-23 11:38:53 +02:00
Ivan Krysak a285ad2785 IRHelperRegister: get a comment from Description 2025-07-23 11:38:53 +02:00
Ivan Krysak b656381ec5 Update ptml documentation
This also reorders definitions in `revng/Pipes/Ranks.h` to match
the order used by the docs.
2025-07-23 11:38:53 +02:00
Ivan Krysak 97aa3c8247 std::string: use implicit default constructor 2025-07-23 11:38:53 +02:00
Ivan Krysak 90862b68ed StringBufferContainer: fix StartingContent 2025-07-23 11:38:53 +02:00
Ivan Krysak 290d2e2c57 ptml::CTypeBuilder: rename into ModelCBuilder 2025-07-23 11:38:53 +02:00
Ivan Krysak 116c8675db Ranks: greatly improve documentation 2025-07-23 11:38:52 +02:00
Ivan Krysak 2b9b925e8c TTG: make doc mandatory in fields too 2025-07-23 11:38:52 +02:00
Ivan Krysak 9589721b52 Model schema: reorder and reformat
This improves readability and navigation in this big file.
2025-07-23 11:38:52 +02:00
Ivan Krysak f49ec25de3 TTG: make doc mandatory in structs and enums 2025-07-23 11:38:52 +02:00
Ivan Krysak a11215bd73 Model schema: drop trailing newlines from docs 2025-07-23 11:38:52 +02:00
Ivan Krysak f391392fe9 Use explicit separator strings 2025-07-23 11:38:52 +02:00
Ivan Krysak 461c49df25 Model: bump version to 5 and introduce migration 2025-07-23 11:38:52 +02:00
Ivan Krysak c9072ec28f TypePathHelpers: add variable and goto label paths 2025-07-23 11:38:52 +02:00
Ivan Krysak 0572de8990 TypePathHelpers: fix incorrect return value paths 2025-07-23 11:38:52 +02:00
Ivan Krysak f4e86b37b8 OpaqueFunctionsPool: leave a TODO 2025-07-23 11:38:51 +02:00
Ivan Krysak 1930f72484 CTypeBuilder: drop replaced tag builders 2025-07-23 11:38:51 +02:00
Ivan Krysak 21734cad34 CTypeBuilder: add new variable and label tagging 2025-07-23 11:38:51 +02:00
Ivan Krysak a7bba503d3 CTypeBuilder: add counting name builder support 2025-07-23 11:38:51 +02:00
Ivan Krysak 4265644adf NameBuilder: introduce counting sub-builders 2025-07-23 11:38:51 +02:00
Ivan Krysak 2f560e797c TrackingContainer: introduce unwrap 2025-07-23 11:38:51 +02:00