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
Matteo Giordano
0ec73686f3
Fixed typos in GeneratedIRReference.rst
2021-09-01 16:34:25 +02:00
Filippo Cremonese
2341b37832
Release build: suppressed unused typedefs warning
...
Builds in release mode failed because of unused local typedefs defined
in headers included from boost. This commit disables that specific
error.
2021-09-01 16:33:33 +02:00
Ivan Krysak
fbf90f8b17
Implement revng::SmallMap::contains
2021-09-01 16:32:56 +02:00
Alessandro Di Federico
92c7ed0129
Merge branch 'feature/model-type-system'
2021-07-22 08:46:30 +02:00
Alessandro Di Federico
a5600a68ab
TupleTree: improve support for 0-sized tuples
2021-07-21 18:22:58 +02:00
Alessandro Di Federico
bf55034fa6
Support deserializing empty TupleTreeReference
2021-07-21 18:22:58 +02:00
Alessandro Di Federico
fd30d3de42
Import the model's type system
...
This commit introduces the type system of the model along with several
various other improvements to the model and its users.
* Introduce the type system.
* Introduce possibility to tag certain fields in the model as to be
optional during YAML serialization.
* All the `Name` fields have been replaced in favor of `CustomName` plus
a `name` method that will use `CustomName` if available, or an
automatically generated name otherwise.
* Make TupleTreeReferences behavior more robust: now you either need to
have a valid pointer to `Root` and a `Path` or be default constructed
(`nullptr` for `Root` and an empty `Path`). Any other configuration is
invalid.
* The type system introduces `RawFunctionType`: this superseds the
previous way in which we were specifying arguments and return
values. Users of such information have been updated accordingly.
2021-07-21 18:22:58 +02:00
Alessandro Di Federico
0f8fa271d9
TupleTree: reduce INTROSPECTION responsibilities
...
This commit also introduces support for optional YAML serialization of
fields.
2021-07-21 18:19:45 +02:00
Alessandro Di Federico
a546ac2a37
Introduce model::Register::getSize
2021-07-21 18:19:45 +02:00
Alessandro Di Federico
69367669d7
model::Register: enable as KOC key
2021-07-21 18:19:45 +02:00
Alessandro Di Federico
56644b8512
Move model::Register in its own file
2021-07-15 13:50:53 +02:00
Pietro Fezzardi
8fa8ca2d03
Rework getWriteableModel to return a TupleTree
...
The previous design returned a model::Binary &, which did not allow
users writing the model to properly initialize cross references between
different parts of the model.
2021-07-15 13:30:25 +02:00
Alessandro Di Federico
b4929b431c
Drop IsTupleEnd concept
2021-07-15 13:30:25 +02:00
Alessandro Di Federico
6d10581163
Whitespace and other minor changes
2021-07-15 13:30:25 +02:00
Alessandro Di Federico
952602c6db
Merge branch 'feature/llvm-12'
2021-06-14 23:04:35 +02:00
Pietro Fezzardi
1047f50f62
Silence -Wvoid-pointer-to-int-cast in support.c
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
67eaaab045
JumpTargetManager: enable InstCombine(true)
...
This fixes the latest failing tests after upgrading to llvm-12.
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
b96fbd091d
Fix check-conventions with clang-format-12
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
6f7de910a6
Enable warning -Wunused-local-typedefs
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
7735879fa0
Enable warning: -Wdeprecated-enum-enum-conversion
...
This was disabled because it triggered errors when compiling with older
versions of llvm-12 and -Werror.
With llvm-12 this needed anymore, so we can re-enable it
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
71c79461d8
MaterializedValue: fix comparison between APInt
...
Comparing APInt requires them to have the same BitWidth.
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
f0a6184ac0
Propagate DebugLoc on CallInst and InvokeInst
...
With llvm-12 thera are more stringent requirement on the propagation of
DebugLoc on CallInst and InvokeInst.
Various CallInst and InvokeInst created during lifting did not fulfill
these requirements, causing the Module to not verify() with llvm-12.
This commit fixes the problem, properly propagating the debug locations.
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
544b553e5c
JumpTargetManger: swap constprop with instsimplify
...
Constant propagation has been dropped from llvm
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
2448fec4a5
AVI: use new LVI API
2021-06-14 23:04:02 +02:00
Pietro Fezzardi
1e5cce6654
AVI: handle new SCEVType in switch
2021-06-14 23:04:02 +02:00