Commit Graph

16 Commits

Author SHA1 Message Date
Alessandro Di Federico c1cbb4e9a0 Initialize pointers to nullptr 2024-09-27 12:07:17 +02:00
Ivan Krysak dfa7478685 Adopt reworked model::Type 2024-06-27 11:05:51 +02:00
Ivan Krysak 927e8006b9 Model: rename TypePath to DefinitionReference 2024-06-27 11:05:49 +02:00
Ivan Krysak ac587cbb4f Model: rename Type into TypeDefinition 2024-06-27 11:05:48 +02:00
Alessandro Di Federico d25d53e711 RootAnalyzer: use generic preserved registers
Before this commit, when outlining parts of `root` for analysis
purposes, we used to replace calls with a set of instructions clobbering
the set of register *not* preserved by such call, or, in case the
prototype was not available, by the default prototype.

This commit forces the usage of the default prototype.

This trades off precision with accuracy but we get the lift pipe not to
depend on any model::Function prototype.
2024-06-20 10:24:50 +02:00
Alessandro Di Federico 47c3dd8f0f Drop model::Segment::Sections 2024-05-22 10:25:25 +02:00
Pietro Fezzardi df3bd470a1 Enforce determinism on CSV handling
Various parts of revng replace `llvm::GlobalVariable`s representing CSVs
with Allocal/Load/Store. In particular, these are PromoteCSV,
RootAnalyzer and PromoteGlobalToLocalVars.

Before this commit, those places were sloppy when replacing CSVs with
Alloca/Load/Store, and did that iterating on a container sorted by
pointers. This caused Alloca/Load/Store to be emitted in different order
accross runs, which in turn caused more non-determinism down the
pipeline.

This commit fixes the non-deterministic behavior, sorting CSVs based on
their names, which should always be present and deterministic.
2024-03-19 09:43:59 +01:00
Ivan Krysak c9c4d5c8b6 Lift: stop using Layout 2024-03-18 19:32:34 +01:00
Alessandro Di Federico 83b94026e4 RootAnalyzer: handle missing prototype 2024-02-09 10:04:20 +01:00
Alessandro Di Federico d8e41028b7 RegisterClobberer -> OpaqueRegisterUser
Extend RegisterClobberer to support also performing opaque reads.
Also, record all the generated instructions for easy purging.
2023-12-11 16:29:13 +01:00
Alessandro Di Federico f51af94e8f TupleTreeReference::isValid is for assertions only 2023-08-23 16:14:05 +02:00
Alessandro Di Federico e0c7038f46 Rework RootAnalyzer::optimize pipeline
This commit reorganizes and explains the reasoning behind the design of
the RootAnalyzer optimization pipeline.
2023-07-26 10:16:25 +02:00
Alessandro Di Federico d4d9e5dac5 DropRangeMetadataPass: preserve all analyses 2023-07-26 10:16:25 +02:00
Ivan Krysak 7d235f4fd0 Enforce licence header consistency
Also do some basic cleanup: capitalize first letters, add `.`
at the end of the sentences, and so on.
2023-07-03 15:23:10 +00:00
Ivan Krysak 01b4ec36c9 Formatting: set AllowShortEnumsOnASingleLine
The new value is `false`.
2023-07-02 13:15:08 +02:00
Alessandro Di Federico a65ccc3413 Introduce ValueMaterializer
`ValueMaterializer` is a rewrite of what was called `AdvancedValueInfo`
which follows the same principles.

The main benefits over the old version is:

* We materialize the data-flow graph and the CFG of the relevant part of
  root. This makes debugging significantly easier.
* We drop the old MonotoneFramework infrastructure in favor of
  getMaximalFixedPoint.
* We significantly reduce the amount of queries we make to
  AdvancedValueInfo.
2023-06-30 13:39:22 +02:00