Giacomo Vercesi
52a5c700e1
revng-check-conventions: add shellcheck
...
Add bash script checks with shellcheck + `set` rule.
Also, all existing bash scripts have been fixed.
2022-04-20 09:54:51 +02:00
Giacomo Vercesi
56b004bfd2
Improve revng-check-conventions
...
* Only check dirty files by default (--all checks all files).
* Better file identification
* Various bash improvements
* Report more explicative errors
2022-04-20 09:53:19 +02:00
Giacomo Vercesi
ab125b35b0
Fix License headers
...
Change company name to "rev.ng Labs Srl" in all license headers
to reflect changed company name and legal status
Add missing license headers to files that didn't have one
2022-04-19 12:17:59 +02:00
Giacomo Vercesi
27195d903f
Sync with new revng-check-conventions script
...
Fixes a couple of minor formatting errors
Remove the use of tail in tests, use grep
Disable checks on lit.cfg.py since it's a fragment
2022-04-19 12:17:59 +02:00
Alessandro Di Federico
427a3ca30e
Merge branch 'feature/enforce-abi-deductions'
2022-04-15 18:52:12 +02:00
Antonio Frighetto
ab4bdf398d
EFA: leverage ABI-specific layer
...
Architecture-agnostic results provided by EarlyFunctionAnalysis
are refined through an ABI-specific layer.
2022-04-15 18:25:11 +02:00
Antonio Frighetto
7235f69a99
EFA: add final results to ABIAnalysis::dump
...
Output `FinalReturnValuesRegisters` results for aiding debugging tasks.
2022-04-15 18:25:11 +02:00
Ivan Krysak
66c96fb128
ABI: improve RegisterStateDeductions
...
Split the interface into two functions: `enforce.*` returning the map by
value and `tryApply.*` returning an `std::optional`.
Improve non-positional single deduction function to better reflect
some corner cases (for example how a required `NoOrDead` register
argument is handled).
Enforce a position-based deduction corner case where it's impossible to
deduce whether the argument is passed in the GPR or the vector one -
now GPR takes precedence in those cases.
2022-04-15 18:25:11 +02:00
Ivan Krysak
c374f8013a
ABI: separate mips and mipsel ABIs
2022-04-15 18:25:11 +02:00
Ivan Krysak
ddd2968faa
ABI: make abi::RegisterState::Map assignable
2022-04-15 18:25:11 +02:00
Antonio Frighetto
c2815949c7
Adopt std::same_as of libcxx
2022-04-15 18:25:08 +02:00
Alessandro Di Federico
8c31b6d974
Merge branch 'feature/invalidation'
2022-04-15 16:07:42 +02:00
Massimo Fioravanti
ea02b4080a
PipelineC: introduce rp_apply_model_diff
...
This exposes the invalidation to users of the C API.
2022-04-15 15:18:56 +02:00
Massimo Fioravanti
3d752f6c7f
Introduce revng pipeline --invalidate-all
2022-04-15 15:18:28 +02:00
Massimo Fioravanti
eef9ba74da
Introduce ModelInvalidationEvent
2022-04-15 15:17:58 +02:00
Massimo Fioravanti
60fd53b1fb
Introduce Kind::verify
2022-04-15 15:17:37 +02:00
Massimo Fioravanti
1b489d9d8c
FileContainer: remove invalidated container
...
If a file container becomes empty, it the old file on disk has to be
removed.
2022-04-15 15:16:24 +02:00
Massimo Fioravanti
3b5d255451
Introduce pipeline invalidation test
2022-04-15 15:16:10 +02:00
Massimo Fioravanti
df2413962b
Introduce TupleTreePath::isPrefixOf(Other)
2022-04-15 15:16:02 +02:00
Massimo Fioravanti
c4aa92694c
Introduce revng model apply
2022-04-15 15:15:41 +02:00
Massimo Fioravanti
bf1de27239
revng model diff: keep output
2022-04-15 15:14:41 +02:00
Massimo Fioravanti
44720eedbd
Redesign TupleTreeDiff
...
`TupleTreeDiff` is now type-safe and owns the changes.
2022-04-15 15:14:13 +02:00
Massimo Fioravanti
38a3c5a086
Introduce TupleTree::deserialize
2022-04-15 15:14:02 +02:00
Massimo Fioravanti
a75eaae66a
Introduce Logger::getAsLLVMStream
2022-04-15 15:13:43 +02:00
Alessandro Di Federico
8cca1b04d6
Merge branch 'feature/revng-c-pipelines'
2022-04-14 18:57:04 +02:00
Pietro Fezzardi
593cc584cb
DLA: propagate type info between loads and stores
2022-04-13 12:41:17 +02:00
Pietro Fezzardi
7f65b1117a
New AddPrimitiveTypesPipe
...
This pipe is executed during the Lift step and populates the model with
all the required primitive types.
2022-04-12 16:40:27 +02:00
Pietro Fezzardi
0c12c47514
Pipes: initialize all llvm passes
2022-04-12 16:17:57 +02:00
Pietro Fezzardi
a4dc1e52fd
EnforceABI: add FunctionTags::ABIEnforced tag
2022-04-12 14:15:01 +02:00
Pietro Fezzardi
69d65956bf
PromoteCSV: add FunctionTag::CSVsPromoted tag
2022-04-12 14:14:19 +02:00
Pietro Fezzardi
77cdc09e37
TaggedFunctionKind: skip Fake functions targets
2022-04-11 09:41:53 +02:00
Alessandro Di Federico
364be5e555
Merge branch 'feature/remove-model-tag'
2022-04-08 19:27:48 +02:00
Pietro Fezzardi
6b2b2e8ada
Make model::Type::edges() method const
2022-04-08 18:58:58 +02:00
Pietro Fezzardi
dfb1bb9fd2
RawFunctionType.edges() uses StackArgumentsType
2022-04-08 18:58:58 +02:00
Pietro Fezzardi
e40ded965f
QualifiedType RawFunctionType.StackArgumentsType
...
The `StackArgumentsType` field of `RawFunctionType` was the only
cross-reference between `model::Type`s that did not use
`model::QualifiedType` but a naked `TupleTreeReference`.
Switching it to `QualifiedType` make all cross-references across
`model::Type`s homogeneous.
2022-04-08 18:58:58 +02:00
Pietro Fezzardi
63a6676551
Make EnumType.UnderlyingType a QualifiedType
...
This was one of the few places left in the type system where a
`model::Type` referred to another one not using QualifiedType, but a
naked `TupleTreeReference`.
Switching it to be a `model::QualifiedType` makes cross-references
between `model::Type`s more homogenenous, requiring less corner-cases
to handle for whoever manipulates types.
2022-04-08 18:58:58 +02:00
Pietro Fezzardi
35ae20099a
Merge feature/remove-model-tag
2022-04-08 18:02:33 +02:00
Pietro Fezzardi
c613c61add
HeadersGeneration: fix stack arguments dependency
...
Before this commit, the DependencyGraph used by HeadersGeneration to
represent dependencies between type declarations and definition did not
take into consideration RawFunctionType.StackArgumentsType properly.
This commit uses model::Type::edges() to inspect the dependencies of
the types, fixing this problem.
2022-04-08 17:58:06 +02:00
Pietro Fezzardi
36541ae5cd
QualifiedType RawFunctionType.StackArgumentsType
2022-04-08 17:58:06 +02:00
Giacomo Vercesi
da06acf29e
Update to reflect removal of tags from model YAML
2022-04-08 17:57:23 +02:00
Giacomo Vercesi
6b9cdbb0ec
Python TupleTreeGenerator: cache type hints
...
This significantly speeds up loading the model.
2022-04-08 17:37:04 +02:00
Giacomo Vercesi
a2b5dbb1dc
TupleTreeGenerator: autogenerate Kind
2022-04-08 17:36:59 +02:00
Giacomo Vercesi
457d782ea8
UpcastablePointer::YAMLTraits: use Kind
2022-04-08 17:32:12 +02:00
Giacomo Vercesi
a5e3606144
Introduce model::FunctionEdge::Kind
2022-04-08 17:31:40 +02:00
Giacomo Vercesi
039f7db93e
model::*: ensure Kind -> Class correspondence
2022-04-08 17:31:05 +02:00
Pietro Fezzardi
a654476789
Make EnumType.UnderlyingType a QualifiedType
2022-04-08 15:24:29 +02:00
Antonio Frighetto
765219d58c
Support for control-flow graph out of the model
...
The control-flow graph has been taken out of the model. Related changes
to `getCallSitePrototype` have been here addressed.
2022-04-06 16:25:05 +02:00
Alessandro Di Federico
b495499ff5
Merge branch 'feature/cfg-out-of-model'
2022-04-05 20:54:20 +02:00
Antonio Frighetto
276d168e32
Introduce LoadFunctionMetadataPass
...
LoadFunctionMetadataPass lazily loads a `std::map` from isolated
function MetaAddress to `efa::FunctionMetadata`, and caches it.
2022-04-05 20:50:20 +02:00
Antonio Frighetto
dddd8ecbcb
Update EFA tests to support CFG out of the model
2022-04-05 15:37:57 +02:00