Commit Graph

6113 Commits

Author SHA1 Message Date
Ivan Krysak 640ab18d60 Rework renvg-abi-verify 2022-03-28 15:38:01 +02:00
Ivan Krysak fdfaf754c0 Improve ABI test directory name and tags 2022-03-28 15:37:59 +02:00
Ivan Krysak ad7f47700a Rework how function type convertion handles names 2022-03-28 15:37:59 +02:00
Ivan Krysak 20bb0a2b90 Fix some minor abi::FunctionType issues 2022-03-28 15:37:59 +02:00
Ivan Krysak 5108c3e50f Introduce ABI-based register sorting 2022-03-28 15:37:55 +02:00
Ivan Krysak fbc59747bc STLExtras.h: introduce append 2022-03-28 15:37:02 +02:00
Ivan Krysak a77f648775 Introduce std::ranges::{,sized_}range 2022-03-28 15:36:51 +02:00
Ivan Krysak 522b760a12 Fix a problem with SystemV_x86_64 abi::Trait 2022-03-28 15:34:42 +02:00
Ivan Krysak 326624f517 Fix TupleTreeCompatible linkage problem
Now all the generated `.cpp` include `Binary.h`. This ensures we don't
trigger the wrong concept due to forward declarations.

Also, this commit introduces a couple of `static_assert`s which should
enable us to early identification of similar problems.
2022-03-28 15:33:30 +02:00
Ivan Krysak c6370816f7 Drop the abi::revng namespace 2022-03-28 15:32:06 +02:00
Alessandro Di Federico d70c19164e revng: append search prefixes upon recursion 2022-03-28 14:34:10 +02:00
Alessandro Di Federico 7439b87ec6 Merge branch 'feature/pipeline-improvements' 2022-03-28 12:29:26 +02:00
Alessandro Di Federico 2ab50495aa LinkForTranslation: reorganize command printing 2022-03-28 12:17:05 +02:00
Alessandro Di Federico 581eab5a28 YAML pipeline: s/module/module.ll/ 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 8bbd3b9435 revng-pipeline: move from --quiet to --verbose 2022-03-28 12:17:05 +02:00
Massimo Fioravanti ce4934f48d Introduce revng-link-for-translation
`revng-link-for-translation` provides a standalone tool needed to
perform the final linking stage of the recompilation.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti f63eefba2c Move LinkForTranslationPipe to lib/Recompile 2022-03-28 12:17:05 +02:00
Massimo Fioravanti c05b5dbb28 Steps now represent the *end* of a step
A special "begin" step has been introduced.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti b362d926ec pipeline: drop implicit rank 0 2022-03-28 12:17:05 +02:00
Massimo Fioravanti ec0275c9aa Minor changes to PipelineC tests 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 26ad273a84 PipelineC: s/copy_string/CopyString/ 2022-03-28 12:17:05 +02:00
Massimo Fioravanti d617533563 PipelineC: remove redundant documentation 2022-03-28 12:17:05 +02:00
Massimo Fioravanti c1d97bf8b3 pipeline: make globals serializable 2022-03-28 12:17:05 +02:00
Massimo Fioravanti de665fe03b PipelineC: new API to check if a target is ready 2022-03-28 12:17:05 +02:00
Massimo Fioravanti b1dac5d17b ContainerBase: introduce serialization primitives 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 58768aca42 YAML pipelines: rename pipe "Name" to pass "Type" 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 7eeb9f50c0 pipeline --verbose: print list of commands
`revng pipeline --verbose` will now print a list of equivalent commands
for the current invocation.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti 39e0f0ac96 TupleTreeDiff<Binary>: fix compile errors 2022-03-28 12:17:05 +02:00
Massimo Fioravanti b2dfd2bc64 TupleTreeGenerator.cmake: single call generation 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 6bd7f4bced Implement FileContainer::remove 2022-03-28 12:17:05 +02:00
Giacomo Vercesi 238450d9be pipeline: improve handling of 0-sized target lists 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 73b8205377 pipeline::Loader: fix error message
Certain messages were missing a `\n`.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti 900ac19228 ContainerSet::remove: removing 0 elements is fine
ContainerSet is now the one that has the burden to check that removal of
0 elements is always a success, rather than offloading that check onto
containers.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti 7aa57ab3b0 LLVMContainer::mergeBack: fix linking failure
`linkInModule` returns true on error. So the condition for failure is
`link(final, module1) || link(final, module2)`, instead of `&&`.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti bb23892df7 Fix detail namespaces
Some `revng::detail` namespace were already inside a different namespace
which lead to the `revng::revng` namespace.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti 5bdce4bf36 LoadModelPass: support command-line path
It is now possible to load a model from file instead of the one written
in the module itself:

    revng opt --model-path=<path>
2022-03-28 12:17:05 +02:00
Massimo Fioravanti 602f1e0701 Introduce non-const PipelineManager::context 2022-03-28 12:17:05 +02:00
Alessandro Di Federico af1828e090 DwarfImporter: better support for 0-sized types
We now ignore field of `struct`/`union` that have a 0-sized type.
We now also ignore types containing a an array with 0-sized elements.
2022-03-28 12:17:05 +02:00
Alessandro Di Federico 67706f05b6 Introduce a never-failing Type::trySize 2022-03-28 12:17:05 +02:00
Massimo Fioravanti 15bb56eb49 Minor changes 2022-03-28 12:17:05 +02:00
Pietro Fezzardi d9906b572f MakeModelGEP: use perfect type match in scoring
Before this commit we did not take into account a perfect type match
when deciding the best ModelGEP to emit.

This commit changes the score to take it into account and score higher a
ModelGEP with perfect type match.
2022-03-28 09:51:52 +02:00
Pietro Fezzardi cd826fc52f MakeModelGEPPass: use CallToLifted tag 2022-03-28 09:51:50 +02:00
Pietro Fezzardi 0796e00d71 DLAMakeModelTypes: fix array fields 2022-03-28 09:51:01 +02:00
Pietro Fezzardi c6d2899374 Drop torture tests
Torture tests have become useless, since with over time they have
become bitwise identical to regular tests.

This commit removes them since they are now just a waste of time.
2022-03-22 18:27:01 +01:00
Filippo Cremonese 70a460c46a TupleTreeGenerator: use dataclasses
Give up on pydantic.
2022-03-22 17:52:02 +01:00
Pietro Fezzardi 2a887d16b6 Drop torture tests
Torture tests have become useless, since with recent changes to revng
they have become bitwise identical to regular tests.

This commit removes them since they are now just wasting time.
2022-03-22 15:53:59 +01:00
Alvise de Faveri 096ab1f5a1 Segregate: copy metadata on the new Call
Before this commit, SegregateStackAccessPass did not update properly the
metadata. Missing metadata did not allow the rest of the pipeline to
detect the special call.

This commit properly copies the metadata and updates the rest of the
pipeline to take care of the special call.
2022-03-22 11:48:27 +01:00
Alvise de Faveri ddf8adca70 DLA: drop ModelFuncHelpers and use shared ones 2022-03-22 10:55:16 +01:00
Alvise de Faveri 4d7e41e62a Add model type helpers to ModelHelpers 2022-03-22 10:55:11 +01:00
Alvise de Faveri 68a4665ea1 Handle markers in getExtractedValuesFromInst() 2022-03-22 10:50:45 +01:00