Commit Graph

1167 Commits

Author SHA1 Message Date
Alessandro Di Federico bb78cb808d Introduce dump method for model structs 2021-10-19 11:59:59 +02:00
Alessandro Di Federico 4be9b33f22 Tag with MetaAddress functions and call sites 2021-10-19 11:59:31 +02:00
Alessandro Di Federico 03998066f0 CallEdge: only indirect calls have a prototype 2021-10-19 11:04:02 +02:00
Alessandro Di Federico a1a2d0bed8 Introduce support for importing DWARF information 2021-10-19 11:03:55 +02:00
Alessandro Di Federico 44e7455473 Introduce support for dynamic functions 2021-10-19 11:03:55 +02:00
Alessandro Di Federico a023bfa7f5 Introduce ABI handling 2021-10-18 20:44:58 +02:00
Alessandro Di Federico 0dfc81da41 Minor model improvements
* Introduce some documentation for the model.
* Improve the way enums are serialized/deserialized.
* Mark certain fields of model data structures as optional.
* introduces some error messages during model validation.
2021-10-18 20:44:58 +02:00
Alessandro Di Federico 5b50a3320f Introduce error messages during model validation 2021-10-18 20:44:58 +02:00
Alessandro Di Federico 34ae75c800 model: handle 80 bits floats (12 bytes) 2021-10-18 20:44:58 +02:00
Alessandro Di Federico 06043b92c6 PromoteCSV: do not promote the stack pointer 2021-10-18 20:44:58 +02:00
Alessandro Di Federico d5bfb872d6 Introduce SortedVector::isSorted
This is a debug method.
2021-10-18 20:44:58 +02:00
Alessandro Di Federico 2fec214959 Fix QualifiedType::isScalar 2021-10-18 20:44:58 +02:00
Alessandro Di Federico fe2e9427c1 scripts/revng: use gdb -q 2021-10-18 20:44:58 +02:00
Alessandro Di Federico d40c8d4589 scripts/revng: use 4 spaces to indent 2021-10-18 20:44:58 +02:00
Alessandro Di Federico e29c36cd51 Drop --disable-enforce-abi-safety-checks 2021-10-18 20:44:58 +02:00
Alessandro Di Federico 18cfbdbfe0 Whitespace and other minor changes 2021-10-18 12:39:21 +02:00
Ivan Krysak 6714c4cb58 Add Node::copy() and Node::move()
Those member functions are an easy way to reach the underlying node data
without affecting the edges stored by the node.
2021-10-04 14:38:42 +02:00
Alessandro Di Federico 6c2bc944c2 Merge branch 'feature/misc-model-improvements' 2021-09-02 14:56:01 +02:00
Pietro Fezzardi a0dbea19e5 Prevent model::Type CustomNames from colliding
This commit reserves the "unnamed_" prefix for revng.
The first use of this reserved prefix is in `model::Type`s
`CustomName`s and `model::Identifier`s.
This commit also makes the `verify()` method stricter for
`model::Identifier` so that an `Identifier` whose name starts with the
reserved prefix does fails verification.
2021-09-02 14:55:47 +02:00
Pietro Fezzardi 3d38451abd Enable error checking on Model deserialization
This commit changes the `TupleTree::deserialize` method to return an
`llvm::ErrorOr<TupleTree>`, enabling users to choose their policies on
error reporting.
2021-09-02 14:42:51 +02:00
Pietro Fezzardi bae9214652 Stricten verification for model::Identifier
Now only `Identifier`s that are valid C identifiers are guaranteed to
verify.
The `fromString` factory is updated accordingly.
2021-09-02 14:42:47 +02:00
Pietro Fezzardi 48f6a60629 Fix callOnPathSteps for KeyedObjectContainer
callOnPathSteps was using linear scan search in KeyedObjectContainer.
This commit fixes it for using binary search, dramatically improving
performance in workloads that do lots of lookups.
2021-09-02 14:39:23 +02:00
Pietro Fezzardi 3f5644dd02 Add operator<=> for model::Qualifier
This allows to keep `model::Qualifier`s in ordered containers, which is
necessary e.g. in `revng-c`.
2021-09-02 14:39:23 +02:00
Pietro Fezzardi aa46b03050 Add name() members to various Model types 2021-09-02 14:39:23 +02:00
Pietro Fezzardi 44b348db6a Provide efficient getName for model::Type enums 2021-09-02 14:39:23 +02:00
Pietro Fezzardi b31f6beb1a Make ManagedStatic IDGenerator static 2021-09-02 14:28:58 +02:00
Alessandro Di Federico c2a7ccaf1a Merge 'feature/generic-graph-qol-improvements' 2021-09-02 14:28:32 +02:00
Ivan Krysak 612461cffa Enable more explicit edge iteration
Add reverse iterator support
2021-09-02 11:09:29 +03:00
Ivan Krysak 509ee3c41a Disallow label-less mutable edge graphs 2021-09-02 11:09:17 +03:00
Ivan Krysak 95e983fef3 Rename has_parent into HasParent 2021-09-02 11:09:04 +03:00
Ivan Krysak b6d95c2cbc Add GenericGraph::clear 2021-09-02 11:08:52 +03:00
Ivan Krysak 3f1f99deff Add GenericGraph::reserve 2021-09-02 11:08:39 +03:00
Ivan Krysak 9a902cc8ab Implement in-place node creation 2021-09-02 11:08:27 +03:00
Ivan Krysak 009a5ae060 Rework EdgeView to improve code consistency 2021-09-02 11:08:14 +03:00
Ivan Krysak 7d24eeaf48 Add a move-only addNode overload 2021-09-02 11:08:01 +03:00
Ivan Krysak 4df418fcbc Add a EdgeLabel alias 2021-09-02 11:07:49 +03:00
Ivan Krysak 334cdf9f05 Make iterators and mapping filters consistent 2021-09-02 11:07:39 +03:00
Ivan Krysak 027be0b030 Implement renvg::mapped_iterator
It's a specialization of `llvm::mapped_iterator` with better
support for temporary objects (`operator->` doesn't cause UB)
2021-09-02 11:05:22 +03:00
Ivan Krysak e5be45ab3b Add explicit names for iterator types 2021-09-02 11:05:10 +03:00
Ivan Krysak 8535f166a9 Prevent multiple edges between a pair of nodes 2021-09-02 11:04:59 +03:00
Ivan Krysak f15e41433f Make graph testing node type agnostic 2021-09-02 11:04:44 +03:00
Ivan Krysak c8a60f9d8e Implement safe node removal 2021-09-02 09:14:20 +03:00
Ivan Krysak 5b60c22feb Implement the core of the mutable edge node 2021-09-02 09:14:20 +03:00
Ivan Krysak 2050561716 Add a comment on top explaining the node types 2021-09-02 09:14:20 +03:00
Ivan Krysak d768d5d89a Add getters for successor and predecessor counts 2021-09-02 09:14:20 +03:00
Alessandro Di Federico 6e4cd06095 Add LLVM libs for --no-undefined compliance 2021-09-01 16:40:56 +02:00
Ivan Krysak 5d66973d18 Allow lines to start with .
This rule, even if it prevents weird line-breaks, prevents us to take
full advantage of both designated initializers and method-chaining
idiom.
2021-09-01 16:36:41 +02:00
Andrea Gussoni fe7d0b256f GeneratedIRReference.rst: toolchain installation 2021-09-01 16:34:25 +02:00
Matteo Giordano e954b07051 GeneratedIRReference.rst: general fixes
General correction about deprecated flags and new ones.
2021-09-01 16:34:25 +02:00
Matteo Giordano 86e27e608c GeneratedIRReference.rst: --no-link not needed 2021-09-01 16:34:25 +02:00