Commit Graph

69 Commits

Author SHA1 Message Date
Giacomo Vercesi 4ae8df0ad2 Yield disassembler: drop support for AMDGPU 2022-11-02 11:50:40 +01:00
Giacomo Vercesi 025f6d5580 Assembly & CFG: fix MIME type
Change the MIME type of the assembly artifact and the svg graphs to the
new naming convention.
2022-10-11 17:11:04 +02:00
Giacomo Vercesi 0566f5342e Yield/PTML: make instruction definition 0-sized
Instruction definition tags are now generated as a 0-size anchor on
the LHS of the text of the actual instruction, this is to prevent
a potential user asking for the definition/reference of the single
instruction.
2022-10-11 17:10:17 +02:00
Giacomo Vercesi 4d0f72548a ControlFlow/SVG: switch to simple tree layouter 2022-10-11 17:10:06 +02:00
Ivan Krysak b94c23cf52 Yield/ControlFlow: stop accounting for footer 2022-10-11 17:09:39 +02:00
Massimo Fioravanti 445bc2aa8c Pipeline: introduce registry for container types 2022-09-29 15:52:26 +02:00
Massimo Fioravanti 9363bbd70a Pipeline: every container type has now a C++ type 2022-09-29 15:51:17 +02:00
Ivan Krysak 5190f8f6c8 Yield: move PTML out of assembly namespace
This fixes an old issue: the headers were moved out out of assembly
a while back while cpp files had been forgotten.
2022-09-26 12:11:20 +02:00
Ivan Krysak 6724b6d9cd revng/Yield/Pipes: streamline file naming 2022-09-26 12:10:47 +02:00
Ivan Krysak bb37d48dad Yield: introduce YieldCallGraphSlicePipe 2022-09-26 12:09:28 +02:00
Ivan Krysak 3cd801dbac SVG: introduce slices-to-SVG converter 2022-09-26 12:09:03 +02:00
Ivan Krysak 15f0c816c6 SVG Exporter: adopt ptml::Tag 2022-09-26 12:08:47 +02:00
Ivan Krysak 63019a3850 Yield: add a Graph keyword to SVG emitters 2022-09-26 12:08:22 +02:00
Ivan Krysak 2e9269caf8 Yield: implement pipes::*::getContract in .h 2022-09-26 12:07:54 +02:00
Ivan Krysak fd994728bd Yield: introduce call graph slicing 2022-09-26 12:01:43 +02:00
Ivan Krysak cf5c010a7c Layouter: introduce simple tree specialization 2022-09-26 10:33:43 +02:00
Ivan Krysak 0ac31f8e92 Layouter: adopt the new entry detection algorithm 2022-09-26 10:33:43 +02:00
Ivan Krysak b267868356 CFG: fix calculateViewBox for entryless graphs 2022-09-26 10:33:43 +02:00
Ivan Krysak 0c7785bc38 Layouter & SVG: improve handling of empty graphs 2022-09-26 10:33:43 +02:00
Ivan Krysak 05d1426dca CrossRelations: drop unnecessary serialization 2022-09-26 10:33:43 +02:00
Ivan Krysak ed8279fe08 Pipes: introduce a call graph emitting pipe 2022-09-26 10:33:43 +02:00
Ivan Krysak c90a49ec56 SVG Exporter: introduce call graph flavour 2022-09-26 10:33:43 +02:00
Ivan Krysak db406a8835 PTML: introduce function links 2022-09-26 10:33:43 +02:00
Ivan Krysak 4303ed5da6 Layouter: implement non-orthogonal edge support 2022-09-26 10:33:43 +02:00
Ivan Krysak 8b01cb0da1 Layouter: increase configuration options 2022-09-26 10:33:43 +02:00
Ivan Krysak 7037be8b90 SVG Exporter: improve arrow head customizability 2022-09-26 10:33:43 +02:00
Ivan Krysak 172e07f398 Layouter: improve multiple entry graph support 2022-09-26 10:33:43 +02:00
Giacomo Vercesi 37caa91e6d Ranks: fix Rank keys
Use model::Function::Key for the Function rank instead of the naked
MetaAddress as it allows forward-compatibility if the model::Function
key is ever changed.

Use a std::tuple<uint64_t> for TypeField as it's the current type for
{Struct,Enum,Union}Field.key()
2022-09-01 17:46:57 +02:00
Massimo Fioravanti 9ce7b1e527 Drop Pipe suffix from pipe names 2022-08-29 14:45:45 +02:00
Massimo Fioravanti 633f49c1ef Introduce dedicated namespace for kinds and ranks 2022-08-29 14:44:53 +02:00
Massimo Fioravanti 915c083661 Pipes: reorganize who defines pipes 2022-08-29 14:44:35 +02:00
Alessandro Di Federico 1d91ed9beb tuple_tree_generator: make C++ just a regular backend
The `tuple_tree_generator` component was still heavily treating C++ as a
special citizen.
This commit normalizes the situation.
2022-08-11 16:20:42 +02:00
Massimo Fioravanti 96bd5835d8 revng-pipeline: rework file-to-container syntax 2022-08-10 09:49:24 +02:00
Ivan Krysak b3f9ce7cc2 Use locations in PTML exporter 2022-08-05 21:47:05 +03:00
Ivan Krysak dff7c5f37d Move yield pipes into revngYield 2022-08-05 21:46:28 +03:00
Ivan Krysak 8f4590bf00 Outline the cross-relation interface 2022-08-05 21:42:58 +03:00
Ivan Krysak 65d1a016d4 Standardize concept naming across the codebase 2022-08-05 17:27:56 +03:00
Ivan Krysak 8dce9ef724 Fix the problem with negative node ranks
Having the initial rank threshhold too low caused them to sometimes
loop around and become negative, causing problems later down the line.

This sets the rank of the "entry" node to 4 offsetting the possible
causes of this issue quite a bit.
2022-08-05 17:27:56 +03:00
Ivan Krysak 240f334d78 Fix minor wording issues 2022-08-05 17:27:56 +03:00
Ivan Krysak 4ffadb2144 Fix an iteration invalidation caused issue 2022-08-05 17:27:56 +03:00
Giacomo Vercesi 3e9058393e Rework YieldAssemblyHTML to output PTML 2022-07-28 08:47:34 +02:00
Ivan Krysak 71115c8062 Implement SVG control flow exporter 2022-06-15 16:04:44 +03:00
Ivan Krysak eb129428a9 Import edge routing from caliban
(the following is the original commit message)

The last step is pretty simple. All that's left to do is to take the
ordered edge container and to `append` their points to their `Path`
2022-06-15 16:04:44 +03:00
Ivan Krysak 5ff8a00b2e Import edge ordering from caliban
(the following is the original commit message)

Now that the problematic edges are dealt with, all the normal edges
need to also get routed, but first, it's a good idea to order them.
As such, the DAG is consumed to produce the list of all the edges in
the optimal order for them to get routed.
2022-06-15 16:04:44 +03:00
Ivan Krysak 479d0287c7 Import corner routing from caliban
(the following is the original commit message)

Now that every single node has gotten its exact position, the only
thing left to do is to route all the edges between them. First of
all, the special edges (like corners) need to be handled.
2022-06-15 16:04:44 +03:00
Ivan Krysak b69121bc0a Import vertical coordinate position from caliban
(the following is the original commit message)

Now, that it's precisely known how much space is needed between each
pair of the layers, it's possible to set the vertical coordinates for
each of the nodes based on the layer heights (the height of the
longest node within said layer) and the number of horizontal lanes
required after it.
2022-06-15 16:04:44 +03:00
Ivan Krysak acf5858099 Import edge lane selection from caliban
(the following is the original commit message)

Now that the nodes are placed into the grid (at least horizontally),
it's possible to focus on the edges. Since, the information about
the number of edges going from/to each of the layers is known, it's
possible to determine the number of horizontal space needed to placed
those.

In this part of the layouter, the focus is on three different laning
points:
- horizontal lanes between layers.
- entry lanes for each of the nodes.
- exit lanes for each of the nodes.

Indexation is done independently for each of the lane types.
2022-06-15 16:04:44 +03:00
Ivan Krysak 057ac648c3 Import horizontal coordinate position from caliban
(the following is the original commit message)

Since the predetermined order of the nodes for each layer was already
predetermined, what's left is to put their coordinates based on the
size of the nodes and the predefined margins between them.

Except the resulting layouts are extremely left-heavy. As such, it's
important to use the coordinate selection part to push as many nodes
to the right as possible to balance the graph out at least somewhat.
2022-06-15 16:04:44 +03:00
Ivan Krysak 98b098cbce Import graph layout finalization from caliban
(the following is the original commit message)

Since from this point on, no breaking changes will be done to the graph
It's possible to finalize the layout. Meaning that from this point
onwards the logical positions of the nodes remain unchanged.

Having this guarantee we can proceed to calculating their real
positions, starting from the horizontal coordinates.
2022-06-15 16:04:44 +03:00
Ivan Krysak eee95028d0 Import linear segment selection from caliban
(the following is the original commit message)

Now that the layer permutation is finalized, it's possible to select
a couple of node-groups that only depend on a single predecessor and
consider them a single linear segment. This allows to "draw" straight
vertical lines accross the layout for nodes that could benefit from
that.

Such linear segments are also paramount for good looking long edges
(both forwards and backwards facing).

\note: this part of the layouter could still use more work.
If you're looking to rework it, this is the spot.
2022-06-15 16:04:44 +03:00