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
Pietro Fezzardi
032463c539
Fix handling of calls with unnamed callees
2021-10-12 09:57:30 +02:00
Pietro Fezzardi
784f38a2a4
New naming convention from revng/dynamic-functions
2021-10-12 09:57:30 +02:00
Alvise de Faveri
e90020b94c
Don't visit the same union twice during dedup
...
Optimization to avoid checking the same union node multiple times.
2021-10-11 18:28:03 +02:00
Alvise de Faveri
a6d0d52107
Remove leftover call from debugging session
...
RemoveConflicts should not be needed here, as it runs before in a
separate step and is also ran during deduplication.
2021-10-11 18:25:18 +02:00
Alvise de Faveri
e2dd34e08e
Avoid comparing a node with itself in union dedup
2021-10-11 18:21:53 +02:00
Pietro Fezzardi
a77f46968c
Merge branch 'feature/dla-deduplicate-union-fields' into develop
2021-10-06 16:38:30 +02:00
Alvise de Faveri
43ae7a91cb
DLA: Add DeduplicateUnionFields Step
...
Add a step that recognizes if two subtrees of a union node are
topologically equivalent and merges them. This corresponds to removing
duplicate fields in unions.
This deduplication was prevously done while emitting layouts.
A check is inserted into DLAMakeLayouts to assert that, after
constructing unions, no union has only one child, which could be the
case if we didn't deduplicate union fields in the graph.
2021-10-06 16:37:37 +02:00
Alvise de Faveri
637bf70ff3
DLA: Make CollapseSingleChild a function
...
Since the reasoning behind single child collapsing can be reused in
other points of the DLA pipeline, move the logic that acts on a single
node in a static function out of the CollapseSingleChild step.
2021-10-05 18:16:21 +02:00
Alvise de Faveri
7e72fc4be1
DLA: Add RemoveConflictingEdges step
...
Add a DLA step that removes all instance-at-offset-0 edges between nodes
that already have an inheritance edge between them.
2021-10-05 18:16: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
Pietro Fezzardi
fda2b0042f
Drop Beautify dependency on MarkForSerialization
2021-09-22 19:01:44 +02:00
Pietro Fezzardi
7ceb6d2f16
Extract BeautifyGHAST in a separate library
2021-09-22 19:00:09 +02:00
Pietro Fezzardi
ce0083a7ff
Extract MarkForSerialization in separate library
2021-09-22 15:03:12 +02:00
Pietro Fezzardi
eea93438cc
Alphabetically sort lib/CMakeLists.txt
2021-09-22 14:57:32 +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