15 Commits

Author SHA1 Message Date
Alessandro Di Federico c883bed765 Drop Logger's StaticEnabled feature 2025-10-31 17:25:03 +01:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Pietro Fezzardi 4efcce2867 DLA: fixed invalid access to NotMergedNode
Before this commit, the DLAStep DeduplicateFields was using
NotMergedNode (a reference) in an assertion, in a place where it was
already invalidated by a preceding call to
CollapseSingleChild::collapseSingle that can mutate the graph.

This caused the assertion to trigger erroneously in some situations.

This commit moves the assertion earlier, in a place where the reference
is guaranteed to always be valid.
2025-01-30 18:00:21 +01:00
Pietro Fezzardi 298e49d80b DLA: add comment on assumptions 2025-01-30 18:00:00 +01:00
Pietro Fezzardi 2c79e3f5b8 DLA: reuse number of children in DeduplicateFields 2025-01-30 17:57:41 +01:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Pietro Fezzardi 99d4c0283a DLA: fix DeduplicateField traversal and comparison
Before this commit the breadth-first traversal was more convoluted and
it used a broken criterion for bailing out, resulting sometimes in
considering a pointer edge as if it was an instance edge.
This in turn caused bugs to the point of the DLA Graph failing
verification.

This commit rewrites and simplifies the main traversal and comparisons
in DeduplicateField to make them robust against these bugs.
2024-07-05 00:43:35 +02:00
Alessandro Di Federico 0c212b66d9 Relicense to MIT 2024-02-29 17:03:36 +01:00
Pietro Fezzardi f367eafad2 DLA: store node neighbours in increasing ID order 2024-02-04 16:07:30 +01:00
Ivan Krysak fe0531868c Use Container::contains() where appropriate 2023-07-05 06:07:09 +00:00
Giacomo Vercesi a4ad571e61 rcc: Fix typos
Fix the typos detected by `codespell`
2023-05-11 10:04:32 +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 f0a1903201 DLA: add ArrangeAccessesHierarchically dla::Step 2022-09-15 11:47:11 +02:00
Pietro Fezzardi f83e513eb7 DLA: fix bug in DeduplicateFields
A logic bug caused the wrong detection of nodes with many fields.
As a result, the field deduplication was only executed on a subset of
the real candidates.
This caused the following two problems.
- Degradation of the quality of the results, i.e. unions that could be
  deduplicated were not deduplicated.
- Failing assertions in rare cases.
  The algorithm assumes that if it's looking at the children
  (C1, ..., Cn) of node A to be deduplicated, then all (C1, ..., Cn)
  have beed already visited, hence they don't have children that should
  be duplicated because they would have been deduplicated already, when
  looking at (C1, ..., Cn). The bug possibly caused to miss the
  deduplication of children of Ci (for some i) causing assertions to
  fail when looking at A to deduplicate (C1, ..., Cn).
2022-09-12 12:14:52 +02:00
Pietro Fezzardi 6f41e625e7 DeduplicateUnionFields is now DeduplicateFields
Before this commit, the dla::Step depended on InterferingInfo, but this
was superfluous.

This commit drops the dependency and enables the Step to run before
ComputeNonInterferingComponents.

This also avoids the need to run ComputeNonInterferingComponents twice
(one before and one after DeduplicateUnionFields), so it can only run
once.
2022-06-08 14:16:51 +02:00