Commit Graph

2212 Commits

Author SHA1 Message Date
Alessandro Di Federico b87641b2fe tmp 2023-01-17 12:17:52 +01:00
Alessandro Di Federico 3dee046e09 tmp 2023-01-05 17:49:43 +01:00
Alessandro Di Federico 0228e1595d Drop PrimitiveType.h 2023-01-05 17:49:43 +01:00
Alessandro Di Federico f4b37cdfa2 tmp 2023-01-05 17:49:43 +01:00
Alessandro Di Federico fedfe6f1cb Fix unit tests 2023-01-05 17:49:43 +01:00
Alessandro Di Federico 3993a20e30 tmp 2023-01-05 17:49:42 +01:00
Alessandro Di Federico 51a605c8a8 tmp 2023-01-05 17:49:42 +01:00
Alessandro Di Federico 9b79518770 Drop PrimitiveType.h 2023-01-05 17:49:42 +01:00
Alessandro Di Federico 210e80f2ce [TEMP] Disable tests 2023-01-05 17:49:42 +01:00
Alessandro Di Federico c6630a2414 eraseIfNoUse: check if WeakVH is dead 2023-01-03 20:51:45 +01:00
Alessandro Di Federico a4f4906ba7 Lift: re-enable InstCombine upon harvesting
InstCombine was disabled in favor of some more basic constant
propagation, but it turns that under certain circumstances this leads to
direct branches appearing as indirect branches until we run InstCombine
during finalization, which triggers an assertion, since we do not expect
any direct jump there.

If this, affects translation performance, we can think to run it less
often.
2023-01-03 13:41:40 +01:00
Alessandro Di Federico 8030f1c909 finalizeNewPCMarkers: do not copy attributes 2023-01-03 13:41:40 +01:00
Alessandro Di Federico dd5914ce61 ProgramCounterHandler: initialize field
The uninitialized field led to SIGSEGVs.
2023-01-02 14:22:56 +01:00
Alessandro Di Federico 991980806e LinkForTranslation: use -l:ld-linux-x86-64.so.2 2023-01-02 10:46:13 +01:00
Alessandro Di Federico 329f610a42 Merge branch 'feature/import-debug-info' 2022-12-13 11:28:16 +01:00
Djordje Todorovic 74c840a9f5 DwarfImporter: set prototype only if available 2022-12-13 11:27:23 +01:00
Djordje Todorovic 8976ab4126 DwarfImporter: handle DW_AT_noreturn 2022-12-13 11:27:16 +01:00
Djordje Todorovic 961f9e5461 Model: search debug info locally upon import
Also find prototypes in Models of dynamic libs for both PE and ELF.
2022-12-13 11:26:54 +01:00
Djordje Todorovic cad68a9876 Instroduce LDDTree 2022-12-13 11:26:25 +01:00
Djordje Todorovic 98a8b8a7a9 Ban identifiers starting with reserved prefixes 2022-12-13 11:25:56 +01:00
Djordje Todorovic 809ea798a6 Introduce revng import debug-info
It supports both PDB and DWARF formats.
We get rid of `import dwarf` tool.
2022-12-13 11:25:46 +01:00
Djordje Todorovic 0d6ffa7504 Introduce revng fetch-debuginfo 2022-12-13 11:25:36 +01:00
Alessandro Di Federico a15428be50 Merge branch 'feature/private-model-accessors' 2022-12-12 18:37:20 +01:00
Massimo Fioravanti 742e1a0c56 TupleTree: switch from public fields to accessors 2022-12-12 18:36:57 +01:00
Massimo Fioravanti 0d3133cfc9 Fix missing includes
This ensures headers make sense on their own, without implicit
assumption about includers to also include other headers before them.
2022-12-09 18:09:39 +01:00
Massimo Fioravanti 4d2f1f71b4 Remove static asserts in tuple tree references
`TupleTreeReference`s use the Root type as a pointer only so they can
operate with forward declarations. Before this commit there were static
asserts that prevented this use case, and thus required the headers
defining the root type to be included before this one to work correctly.

We drop those `static_assert`s to make sure that all headers are parsable
on their own.
2022-12-09 14:01:10 +01:00
Alessandro Di Federico 5de242c08f model.ts.tgz: do not generate at every build 2022-12-09 14:01:10 +01:00
Alessandro Di Federico 9759ab1ad8 Merge branch 'feature/build-performance' 2022-12-09 10:12:07 +01:00
Alessandro Di Federico 5fb9ba4313 TupleTree diff: externalize 2022-12-09 10:11:27 +01:00
Alessandro Di Federico daf4a85364 llvm::yaml::yamlize: externalize 2022-12-09 10:11:27 +01:00
Alessandro Di Federico 0245bf81d7 stringAsPath: externalize 2022-12-09 10:11:27 +01:00
Alessandro Di Federico a96270a8aa TupleTree::visit: externalize 2022-12-09 10:11:27 +01:00
Alessandro Di Federico 207426cdf2 tests/unit/Model: drop unnecessary tests 2022-12-09 10:11:27 +01:00
Alessandro Di Federico 974dd0c680 yield::Function: do not use efa::BasicBlock
This change introduces some duplication but ensures an important
property of `tuple_tree_generate`d: data structures: all the leaves are
scalars. Previously, yield::Function was using efa::BasicBlock, making
things more difficult under certain conditions.
Specifically, we can rely on the fact that, when generating a visit to
the TupleTree, we know everything about all non-scalars.
2022-12-09 10:11:27 +01:00
Alessandro Di Federico 10852adae6 TestClass: use ROOT_TYPE 2022-12-09 10:11:27 +01:00
Alessandro Di Federico 93872783f7 yield::ControlFlowGraph: use ROOT_TYPE 2022-12-09 10:11:27 +01:00
Alessandro Di Federico 66b12ad540 Yield: move CrossRelation into its own directory
Also, use ROOT_TYPE.
2022-12-09 10:11:27 +01:00
Alessandro Di Federico 63e3330bab efa::FunctionMetadata: use ROOT_TYPE 2022-12-09 09:12:28 +01:00
Alessandro Di Federico 22c1ec78eb TupleTree: handle type-erased visitors
This commit reduces build times by introducing a type-erasure layer when
performing a visit on TupleTrees. Basically instead of propagating the
type of the visitor along all of the template castle, we wrap the
visitor into a virtual class with one method for each possible type in
the TupleTree.
This enables a single instatiation of visit algorithm.
2022-12-09 09:10:39 +01:00
Alessandro Di Federico 693b361e4a TupleTree: externalize several methods 2022-12-09 09:08:40 +01:00
Alessandro Di Federico 3a7b78584f Externalize cl::opt generations in Debug.h
These have a significant impact on build times.
2022-12-09 09:07:59 +01:00
Alessandro Di Federico de976fab13 Externalize ModelWrapper::get*Model 2022-12-09 09:07:16 +01:00
Alessandro Di Federico bffbd58434 tuple_tree_generator: generate one .cpp only 2022-12-09 09:07:06 +01:00
Alessandro Di Federico 58c6e095b6 TTG CMake: one target, many schemas
This commit ensures that `target_tuple_tree_generator` can handle being
invoke multiple times on the same target.
This avoids the need to create a dedicated library as a workaround.
2022-12-09 09:05:14 +01:00
Alessandro Di Federico c3fc2d1f88 TupleTreeDiff deserialization: fix initialization
We used to assign an uninitialized field to `false`. However, what we
really wanted to is to construct the optional by invoking the default
constructor of the `value_type` of the optional.
2022-12-09 09:02:35 +01:00
Alessandro Di Federico 821f3b169a abi/test.sh: fix shellcheck warning 2022-12-09 09:02:29 +01:00
Alessandro Di Federico e9db913291 Disassembler: fix iterator invalidation issue
The index of an element of a `SortedVector<yield::Tag>` was saved, but
`SortedVector` behaves like a set.
The issue has been fixed by creating a temporary `Tag` instead of trying
to keep a reference to an existing one.
2022-12-09 09:00:20 +01:00
Alessandro Di Federico 98025f4dbe yield::Tag: let TTG emit the key 2022-12-09 08:59:46 +01:00
Alessandro Di Federico c75a3450c1 TupleTree::deserialize: drop useless yaml::Input
This was a leftover from yaml::Input usages centralization.
2022-12-09 08:58:30 +01:00
Alessandro Di Federico a29b931f2a Merge branch 'feature/cabi-prototypes' 2022-11-30 15:09:31 +01:00