Commit Graph

375 Commits

Author SHA1 Message Date
Massimo Fioravanti 19b2b23ce7 Dropped the steps in favor of begin steps 2022-03-10 13:51:28 +01:00
Giacomo Vercesi 1e4291a21a Add 0-length checks 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 8852c73cf9 Add global serialization 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 807d9d56ba Introduce serialization primitives for containers 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 091376ddfa Added kind verification 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 8032142c92 Renamed Pass Name to Type in the yml dsl 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 0aaead45ab Add: Command line explanation of pipes invocation 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 9b7a81f3f2 Drop: pipeline implicit rank 0 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 36b18b9fc5 Fix: loader error message 2022-03-10 13:51:28 +01:00
Massimo Fioravanti c0f3e34a6a Add pipelineC invalidation trigger 2022-03-10 13:51:28 +01:00
Massimo Fioravanti b12760ccf2 Add invalidate all pipeline manager 2022-03-10 13:51:28 +01:00
Massimo Fioravanti ddd80f34ec Model Invalidation Event 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 37b1dbd6c0 Implement remove on FileContainer 2022-03-10 13:51:28 +01:00
Massimo Fioravanti c233737216 Fix: 0 elements removal is not a failure
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-10 13:51:28 +01:00
Massimo Fioravanti de9fb4ae7e Add CallGraphCache 2022-03-10 13:51:28 +01:00
Massimo Fioravanti 361faa5a80 Factor out yaml generation into a single call 2022-03-10 13:51:28 +01:00
Alvise de Faveri 0659e6b6a3 Model: Improve getCallSitePrototype() helper
1. Hoist the logic to retrieve a model CallEdge from an llvm::CallInst
   out of `getCallSitePrototype()`, in a separate `getCallEdge()`
   function.
2. Modify `getCallSitePrototype()` so that the parent function's type is
   optional.
2022-03-02 15:40:27 +01:00
Massimo Fioravanti b982b69c5d revng-model-inject: support model-less modules
Inject is meant to inject a model into an `llvm::Module`, but it fails
when operating on a Module that had no model metadata.

This commit fixes the bug.
2022-03-02 15:40:27 +01:00
Ivan Krysak bc0e6d1392 ABI: preliminary FinalStackOffset computation 2022-02-25 00:32:24 +01:00
Ivan Krysak 2c35fc87d5 Conversion to RawFunctionType cannot fail 2022-02-25 00:31:14 +01:00
Ivan Krysak 11989b316b Ensure model is untouched RawToCABI
It's now guaranteed to leave the model unmodified if the converstion
from `RawFunctionType` to `CABIFunctionType` fails.
2022-02-25 00:30:51 +01:00
Ivan Krysak d811321538 InvokeIsolatedFunctions: adopt Layout 2022-02-25 00:30:38 +01:00
Ivan Krysak f30ed88eb5 EnforceABI: adopt FunctionType::Layout 2022-02-25 00:30:27 +01:00
Ivan Krysak b14fee7515 Implement abi::FunctionType::layout()
The `Layout` data structure works as a common view over
`RawFunctionType` and `CABIFunctionType`.
2022-02-25 00:30:14 +01:00
Ivan Krysak 541643afc3 Move function type conversion to librevngABI 2022-02-24 23:56:30 +01:00
Filippo Cremonese 09a995ba51 python-model: generate from jsonschema 2022-02-23 18:03:35 +01:00
Alessandro Di Federico b7f5884f8c DynamicFunction::name: no OriginalName direct use 2022-02-14 17:54:32 +01:00
Ivan Krysak 242b885a78 Remove obsolete ABI utilities 2022-02-14 13:35:37 +01:00
Ivan Krysak 371f5c4555 Implement ABI-based register state deductions
This will help EarlyFunctionAnalysis in providing more accurate results,
in case assumptions about the ABI can be made.
2022-02-14 13:35:37 +01:00
Ivan Krysak 9771ae29d6 Move RegisterState to ABI 2022-02-14 13:35:37 +01:00
Ivan Krysak cafe44097b ABI: introduce default function type generation 2022-02-14 13:35:37 +01:00
Ivan Krysak 8d876b0def ABI: introduce bulk function conversion 2022-02-14 13:35:37 +01:00
Ivan Krysak e20e65ca9a Require a description when registering a pass 2022-02-14 13:35:36 +01:00
Ivan Krysak 7369e49eba Implement "best effort" function type convertion 2022-02-14 13:35:36 +01:00
Ivan Krysak 68129c9221 Add model::Binary::DefaultABI field 2022-02-14 13:35:36 +01:00
Ivan Krysak bac670a38a monotone_framework_lattice: move generation notice
It made it look like the template was autogenerated.
2022-02-14 10:57:20 +01:00
Alessandro Di Federico ec6d4dbe74 Ensure all files end with a newline 2022-02-14 10:56:15 +01:00
Alvise de Faveri 7593d4da23 PromoteCSVs: promote PC CSVs 2022-02-12 12:04:14 +01:00
Alvise de Faveri 812b73f2a2 Remove opaquepc()
We can set the PC to the expected value after each call instead
of creating an `opaquepc()` call.
2022-02-11 13:42:29 +01:00
Alessandro Di Federico e80d159944 revng-pipline: simplify Kinds.h 2022-02-08 17:44:33 +01:00
Alessandro Di Federico fa8061b805 Drop dead Kinds 2022-02-08 17:44:19 +01:00
Pietro Fezzardi 29c50fa909 Model: reserve names defined in stdint.h
This commit adds a bunch of type names and macro names to the set of
reserved keywords that cannot be used for names in the revng Model.
These are the names defined in the stdint.h standard C header, that is
included automatically by the decompiler in decompiled code.

We need to reserve these names otherwise it would be possible to add
things to the revng Model with names that clash with the names defined
in stdint.h, which would in turn break recompilation of decompiled code
because of conflicting definitions.
2022-02-08 15:54:02 +01:00
Massimo Fioravanti fe9686be03 revng-pipeline: introduce C API 2022-02-08 00:05:03 +01:00
Massimo Fioravanti a8a8da3bae Introduce revng pipes
This commit imports all the revng pipes (and other support utilities) to
be used with `revng-pipeline`. In particular, the pipes necessary for
binary translations have been introduced.
2022-02-08 00:05:03 +01:00
Massimo Fioravanti 6f0d0c4f9d CodeGenerator: accept an external model 2022-02-07 22:24:39 +01:00
Massimo Fioravanti 98ecd38162 Drop PureLLVMPipe
Now LLVM passes can be used directly in an LLVMPipe without specifying a
contract for it.
2022-02-07 22:24:39 +01:00
Alessandro Di Federico fec5f3537b s/Granularity/Rank/ 2022-02-07 22:24:39 +01:00
Alessandro Di Federico e2cd7cbcdf Pipeline: simplify LLVMContainer 2022-02-07 20:11:37 +01:00
Massimo Fioravanti 396095706f Minor changes to revngPipeline 2022-02-07 20:11:15 +01:00
Alessandro Di Federico 0f084ed620 Minor changes 2022-02-07 16:55:46 +01:00