Commit Graph

6113 Commits

Author SHA1 Message Date
Alessandro Di Federico 6297537486 Drop Pipe::print 2024-09-27 12:07:18 +02:00
Alessandro Di Federico fbf79b5d1b Make Pipe::checkPrecondition optional 2024-09-27 12:07:18 +02:00
Alessandro Di Federico 4f1252042c Drop TaggedFunctionPass 2024-09-27 12:07:18 +02:00
Alessandro Di Federico bc064244d6 s/deserialize/fromString/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico bdb5284540 Target::dump: use toString 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 42fb8455c2 Outline InvalidationMetadata::PipeWrapper 2024-09-27 12:07:17 +02:00
Alessandro Di Federico c1cbb4e9a0 Initialize pointers to nullptr 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 2cdedc71f4 s/serialize/toString/
We keep serialize for method dealing with streams.
If it returns a `std::string`, let's use `toString`.
2024-09-27 12:07:17 +02:00
Alessandro Di Federico c8d4381297 s/Context &Ctx/Context &Context/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 9bdce8e5c4 s/ExecutionContext &Ctx/ExecutionContext &EC/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico baa1bd612e Introduce recreateWithoutBody
Similar to moveToNewFunctionType, but doesn't move the BasicBlocks.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico 20b2f97484 EnforceABI: register all recreated functions
Before this change, we were remapping from old to new only functions
that have been requested. Now, we remap also those that are just called.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico 45f29c0f20 FunctionPassImpl: getAnalysis for functions
`pipeline::FunctionPass` is actually a ModulePass, therefore, in order
to use `getAnalysis` on a pass running with function granularity, we
need to use the `getAnalysis` overload accepting a `llvm::Function`.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico ee724aae83 Make pipe names dynamic
This enables us to have the list of passes in the `generic-llvm-pipe`
name, which would be otherwise carrying poor information.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico 12a0a89e15 Ensure every pipe commits what it should
This commit is the final step in ensuring all the pipes commit what they
should. It also asserts this actually happens, enabling us to easily
catch future problems.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico 2fd7f06843 ZipMapIterator: handle llvm::StringMap 2024-09-27 12:07:16 +02:00
Alessandro Di Federico baea87f606 Pipeline: improving dump methods 2024-09-27 12:07:16 +02:00
Alessandro Di Federico 0126f0ce9b CodeGenerator: use VirtualSize when ptc.mmaping 2024-09-27 12:07:16 +02:00
Alessandro Di Federico 850276f5c8 Minor changes 2024-09-27 12:07:16 +02:00
Alessandro Di Federico a1889b77b3 s/(LLVMContainer &)TargetsList/\1ModuleContainer/ 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 19d033958e Drop TargetListContainer 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 77ed34e633 Minor fixes to tests
Some of these changes are due to non-determinism.
We should find a more appropriate fix next time.
2024-09-27 10:35:10 +02:00
Alessandro Di Federico 5d0d4005c5 s/Ctxt?/Context/g 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 8a5ae5f9c1 s/ExecutionContext &Ctx/ExecutionContext &EC/g 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 8706fd8459 Initialize pointers to nullptr 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 9c99ac33ac s/serializeToLLVMString/toLLVMString/ 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 08e1dc0f05 Drop no-op Pipe::checkPrecondition 2024-09-27 10:35:10 +02:00
Alessandro Di Federico 4653796008 Drop Pipe::print 2024-09-27 10:35:10 +02:00
Alessandro Di Federico ca99bbbb66 Adopt toString() 2024-09-26 17:51:08 +02:00
Alessandro Di Federico e1f46264f8 Ensure every pipe commits what it should 2024-09-26 17:51:07 +02:00
Alessandro Di Federico bd08864e49 DwarfReader::readValue: handle DW_EH_PE_omit 2024-09-26 17:44:51 +02:00
Alessandro Di Federico 835a00d80c Minor changes 2024-09-25 10:00:22 +02:00
Andrea Gussoni 5849deee50 Remove CycleEquivalenceInfo 2024-09-20 21:06:46 +02:00
Andrea Gussoni 70734496f3 GenericGraph: remove Undirected
Remove the `Undirected` `GraphTraits`
2024-09-20 16:08:50 +02:00
Andrea Gussoni 76cb852c28 Implement GenericRegionInfo
We implement the `GenericRegionInfo` analysis.

The analysis accepts a template parameter which enables to run it on
every graph which exposes `llvm::GraphTraits`.
The `GenericRegionPass` is responsible for instantiating and running the
analysis on a `llvm::Function`.

The `GenericRegionInfo` analysis uses, and takes insipiration from the
`GenericCycleInfo` LLVM analysis.

The analysis exposes a tree of well nested `GenericRegion`s, which are
constructed starting from the well nested tree of `GenericCycle`s.
In addition, we perform the election of the `Head` of each
`GenericRegion`, and the election of the retreating edges.
2024-09-19 18:11:19 +02:00
Pietro Fezzardi 4b8ff1c032 Merge branch 'feature/simpler-precedence' 2024-09-10 10:59:02 +02:00
Ivan Krysak b4a6682a3e OperatorPrecedence: introduce forced parentheses 2024-09-10 11:49:42 +03:00
Ivan Krysak 5666b063cc OperatorPrecedence: handle logical or and and 2024-09-10 11:49:42 +03:00
Ivan Krysak 17cc3e497f OperatorPrecedence: rework precedence encoding 2024-09-10 11:49:42 +03:00
Ivan Krysak d52d8f153c Introduce basic operator precedence testing 2024-09-10 11:49:42 +03:00
Giacomo Vercesi ba0f374eae revng cli: add --wrapper option
Add the `--wrapper` option which allows the user to pass an arbitrary
wrapper to the invocation of executables.
2024-09-10 10:14:12 +02:00
Giacomo Vercesi 2dfca729bc commands_registry: fix wrapper assertion
Add missing wrappers to the assertion that checks that only one wrapper
can be used at a time.
2024-09-10 10:14:12 +02:00
Ivan Krysak 70a39678ff OperatorPrecedence: introduce forced parentheses 2024-09-05 14:33:12 +03:00
Ivan Krysak d5c7365f4f OperatorPrecedence: switch to cppreference scale 2024-09-05 10:18:55 +03:00
Pietro Fezzardi 577ebe5d32 Merge 'feature/omit-padding-when-editing-structs' 2024-09-04 17:16:15 +02:00
Ivan Krysak a8b5ebdd95 import-from-c: rework testing from the ground up 2024-09-04 16:55:49 +02:00
Pietro Fezzardi 4d845c5cdb HeaderToModel: drop unused Logger 2024-09-04 16:55:49 +02:00
Pietro Fezzardi 4e2617f4c5 HeaderToModel: fix double parsing of enums 2024-09-04 16:55:48 +02:00
Ivan Krysak d36e50e0d1 HeaderToModel: switch to the new annotation system 2024-09-04 16:44:23 +02:00
Ivan Krysak 77c8e4b927 PTML: move annotation data to a new header 2024-09-04 16:43:57 +02:00