Pietro Fezzardi
32cf3fc3cf
OpaqueFunctionsPool: remove redundant LLVMContext
2022-03-30 17:21:48 +02:00
Pietro Fezzardi
918bf8d2b1
Use new OpaqueFunctionsPool init methods
2022-03-30 17:21:48 +02:00
Pietro Fezzardi
838c5f7319
Load type-based OpaqueFunctionsPool from Module
...
This commit adds two method for OpaqueFunctionsPool that use
a pointer to `llvm::Type` (or a class derived from `llvm::Type`) as key.
Both methods are used to initialize the pool with pre-existing functions
inside an `llvm::Module` that match a specific `FunctionTags::Tag`:
- `initializeFromReturnType` uses the return `llvm::Type` of the
function as key in the pool
- `initializeFromNthArgType` takes an additional argument which is an
index N, and uses the return `llvm::Type` of the N-th argument as a
key in the pool
These methods are useful for avoiding unnecessary proliferation of
opaque functions in an `llvm::Module`, re-using the existing ones
instead if they are already present.
2022-03-30 17:21:48 +02:00
Pietro Fezzardi
b27432fcbd
Move NotVoid and DerivesFrom to ADT/Concepts.h
...
since they can be useful elsewhere.
2022-03-30 17:11:40 +02:00
Pietro Fezzardi
b4c733ab57
Move Concepts.h into include/ADT for better reuse
2022-03-30 17:09:24 +02:00
Pietro Fezzardi
18f5d7577f
Move copy_to_build_and_install to Common.cmake
...
This enables using this handy helper function also in revng-c.
2022-03-30 14:39:29 +02:00
Alessandro Di Federico
9573946a92
Merge branch 'feature/abi-stack-arguments'
2022-03-28 16:16:26 +02:00
Ivan Krysak
c7fe3b0a42
Improve ABI testing artifact naming
2022-03-28 15:43:34 +02:00
Ivan Krysak
2313335feb
abi-verify: move to a byte array-oriented approach
2022-03-28 15:43:34 +02:00
Ivan Krysak
59b5d3dce4
Add runtime ABI trait access
2022-03-28 15:43:34 +02:00
Ivan Krysak
a10415fd0b
Make the function layout argument type aware
2022-03-28 15:43:34 +02:00
Ivan Krysak
a7617f3567
Describe the ABI testing utilities
2022-03-28 15:43:32 +02:00
Ivan Krysak
1b03adca5e
Make function type convertions self-sufficient
2022-03-28 15:38:04 +02:00
Ivan Krysak
23173aef29
Add a specialized model comparison tool
...
It fixes mistreated RFT stack arguments before relying on model passes
for the comparison itself.
2022-03-28 15:38:04 +02:00
Ivan Krysak
f614a8cf7f
Implement ABI SystemV_x86_64 stack support
2022-03-28 15:38:04 +02:00
Ivan Krysak
974229b171
Optimize the ABI testing script
2022-03-28 15:38:01 +02:00
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