Commit Graph

3168 Commits

Author SHA1 Message Date
Pietro Fezzardi fbc9844499 DLA: add ResolveLeafUnions dla::Step 2022-09-29 18:38:11 +02:00
Pietro Fezzardi 8e75677307 ArrangeAccessesHierarchically: push down pointers
This commit enables ArrangeAccessesHierachically to push down pointer
edges when rearranging accesses hierarchically.

In particular, if an edge N is being pushed down another edge M, and M
is at offset 0, and N reaches a pointer edge PE that points to a
grandparent G of M at offset 0, then we want to push down the pointer
edge PE so that it points to the target of M, unless there is another
edge M' different from M, such that M' has the same properties of M but
target(M) != target(M').
2022-09-29 18:38:11 +02:00
Pietro Fezzardi b4e57e2799 DLA: ArrangeAccessesHierarchically uses mergeNodes
Before this commit, ArrangeAccesseHierachically was removing nodes from
the graph, instead of merging them.
This degraded the information collected on the graph useful for debug.
This commit drops the use of removeNode method, and switches to using
mergeNodes, that preserves the useful debug information when merging.
2022-09-29 18:38:11 +02:00
Pietro Fezzardi cdd6e57a27 DLA: DLATypeSystem::dropOutgoingEdges
This method removes all the outgoing edges starting from a given
LayoutTypeSystemNode.
2022-09-29 18:38:11 +02:00
Pietro Fezzardi 84d427d240 DLAMakeModelTypes: emit Generic instead of Number 2022-09-29 18:38:11 +02:00
Pietro Fezzardi 1ccf0bd5df DLA: simplify constructor of DeduplicateFields 2022-09-29 18:38:11 +02:00
Pietro Fezzardi ac29a77a70 DLAPass: improve pipeline
This commit introduces an additional run of CollapseSingleChild and
DeduplicateFields before CompactCompatibleArrays and
ArrangeAccessesHierarchically.

This is meant to cleanup the graph so that the two latter steps can be
more effective.
2022-09-29 18:38:11 +02:00
Pietro Fezzardi 0298db677d DLA: add CompactCompatibleArrays dla::Step 2022-09-29 18:38:11 +02:00
Pietro Fezzardi 07dc677196 dla::CollapseSingleChild: remove invalidation
The invalidation was overly strict and not necessary.
2022-09-29 18:38:11 +02:00
Pietro Fezzardi 1bc708fadc Drop postProcessMerge from dla::DeduplicateFields
Before this commit postProcessMerge was making some strong assumptions
about dla::CollapseSingleChild::collapseSingle that no longer hold.

Namely the (now) wrong assumption is that collapseSingle would not break
post_order iteration, which is now false because collapseSingle can
change the incoming edges of the node it's called on, and those incoming
edges are on the visit stack of the post_order iteration itself.

This required making a copy of the post order, and resulted in dropping
the postProcessMerge function alltogether.
2022-09-29 18:38:11 +02:00
Pietro Fezzardi c5236310a9 Use uint64_t only in dla::OffsetExpression
Before this commit we were using int64_t for Offset, Strides, and
TripCounts.

Originally, this choice was intended because for some time we envisioned
actually having a use for negative values, but in the end we decided
there's no use for those.

This commit switches all to unsigned integers, allowing to remove some
static_cast across the codebase, and overall easing typicall computation
we have to perform on those fields.
2022-09-29 18:38:11 +02:00
Massimo Fioravanti 049ba69d43 Pipeline: containers can now enumerate their kinds 2022-09-29 15:55:30 +02:00
Massimo Fioravanti dc23473d85 Introduce Loader::getRegistered{Pipes,Analyses} 2022-09-29 15:55:16 +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
Pietro Fezzardi 688df14d55 MakeModelGEPPass: use caching more often 2022-09-29 15:14:48 +02:00
Alessandro Di Federico 9dd0b139c0 PromoteCSVs: helpers no longer return structs
PromteCSVs creates wrappers around helpers. These helpers used to return
a struct in case the helper was changing a CSV.

In order to simplify the downstream pipeline, we now use out arguments
instead of returning a struct.
2022-09-29 10:53:47 +02:00
Alessandro Di Federico 5a7c120433 Translator: stop translation if leaving +x page
If a basic block is starting in a traslated page, but it extends out of
it, stop translation.
2022-09-29 09:02:52 +02:00
Alessandro Di Federico e430891ef6 CCodeGenerator: do not generate %name
In certain code paths, CCodeGenerator would trigger the emission of
`%[number]`, which is very expensive since it requires to assign an ID
to a large amount of `llvm::Value`.

This commit ensure this doesn't happen, unless a logger is active.
2022-09-27 11:47:26 +02:00
Alessandro Di Federico 8d4b3833ec InvokeIsolatedFunctions: adopt splitBasicBlockBefore 2022-09-26 18:10:12 +02:00
Alessandro Di Federico df17c199c8 s/object..o/object.o/ 2022-09-26 18:09:01 +02:00
Alessandro Di Federico f6d5cd24dd Give pretty names to temporary files 2022-09-26 18:09:01 +02:00
Alessandro Di Federico c14677b162 RemoveLiftingArtifacts: do not fail, if env is absent 2022-09-26 17:02:38 +02:00
Alessandro Di Federico 2a7f685aa6 MakeModelGEP: use TupleTreeReference::getConst 2022-09-26 16:52:18 +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
Massimo Fioravanti 3ed1ce9902 Read-only containers: support multiple readers 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
Ivan Krysak a5f97fc215 Pipes: prevent non-root ranked file containers 2022-09-26 10:33:43 +02:00
Ivan Krysak 247710648f Minor changes 2022-09-26 10:33:43 +02:00
Alessandro Di Federico 07ff20585c pipeline-analysis: handle 0 functions 2022-09-22 17:43:56 +02:00
Alessandro Di Federico 8cf981fbf8 JTM: no assert on indirect jump to invalid address 2022-09-22 17:43:56 +02:00
Alessandro Di Federico cf62e6dce7 Minor changes 2022-09-22 17:43:55 +02:00