Commit Graph

573 Commits

Author SHA1 Message Date
Pietro Fezzardi e95f77aeb6 RegionCFG::isDAG: use llvm::scc_iterator::hasCycle 2022-12-01 12:15:12 +01:00
Pietro Fezzardi cadb71f2b2 RegionCFGTreeImpl.h: use std::erase_if 2022-12-01 12:15:12 +01:00
Pietro Fezzardi 3a329b0d95 MetaRegion: drop unused method getProbableEntry 2022-12-01 12:15:12 +01:00
Pietro Fezzardi c73b447c60 Use MFP in RegionCFG::inflate for reachable exits 2022-12-01 12:14:37 +01:00
Pietro Fezzardi ee0dc97464 Uniform printing return types of functions 2022-11-30 18:16:13 +01:00
Pietro Fezzardi 7b66b9d7f6 TypeNames: fix redundant whitespaces in types 2022-11-30 18:16:13 +01:00
Pietro Fezzardi 7f6735f212 ModelHelpers.h: add stripPointer helper
This assumes that the input QualifiedType has at least one Qualifier,
and that the first Qualifier is a pointer-qualifier.
2022-11-30 18:16:13 +01:00
Pietro Fezzardi 389a184fc2 Handle CABIFunctionTypes returning struct types 2022-11-30 18:16:13 +01:00
Alessandro Di Federico 537c1e7524 IRHelpers: introduce emitMessage 2022-11-30 18:16:13 +01:00
Ivan Krysak 033ccbe51a Adopt FunctionType::Layout to improve CABI support 2022-11-30 18:16:13 +01:00
Massimo Fioravanti a057ce54a7 Avoids missing outputs when empty
FileContainer should not be used when we wish to produce a empty output
file rather than no file at all.
2022-11-22 15:21:03 +01:00
Massimo Fioravanti 335d402245 Change signatures to forward metadata cache. 2022-11-22 12:27:02 +01:00
Pietro Fezzardi 8aaa3ca92e Refactor PTML generation for functions 2022-11-16 16:02:09 +01:00
Pietro Fezzardi e72a578743 Refactor PTML generation for local variables 2022-11-16 11:24:37 +01:00
Pietro Fezzardi 79a319cdeb PTML.h: sort ptml::c::tokens alphabetically 2022-11-16 07:48:43 +01:00
Pietro Fezzardi 0812989cb0 Drop unused ptml::c::tokens::Comparison 2022-11-16 07:47:18 +01:00
Pietro Fezzardi a23d4f8dcf Ranks.h: simplify ranks, delete unnecessary ranks 2022-11-15 15:54:20 +01:00
Pietro Fezzardi ff631c5364 PTMLC.h: switch to string-based return values 2022-11-15 15:54:20 +01:00
Pietro Fezzardi c93392fa3b Refactor PTML generation for helpers 2022-11-15 15:54:20 +01:00
Pietro Fezzardi 38ce08edba PTMLC: add Const keyword 2022-11-15 15:54:20 +01:00
Pietro Fezzardi e1ded3a479 HelpersToHeader: refactor PTML Tags 2022-11-15 15:54:20 +01:00
Pietro Fezzardi 2ec8b7e32c ModelToHeader: refactor creation of PTML Tags 2022-11-15 15:54:20 +01:00
Pietro Fezzardi 6734494bad Move scopeTag helper function to revng 2022-11-15 14:03:07 +01:00
Giacomo Vercesi 6e8333ed62 Kinds: add new Location/definitionKind info 2022-11-10 17:27:53 +01:00
Pietro Fezzardi cf6be43571 Support void types in areMemOpCompatible 2022-11-09 17:00:14 +01:00
Pietro Fezzardi 0097af6dd0 Fix peelConstAndTypedefs for model::TypedefType
Before this commit typedefs were not unwrapped correctly, leading to
infinite loops.
2022-11-09 11:59:51 +01:00
Pietro Fezzardi bf83f40e3b Move SCEVBaseAddressExplorer.h from public headers 2022-10-21 10:00:23 +02:00
Pietro Fezzardi 25119c4377 Drop bugged addPointerQualifier for getPointerTo
This commit removes the bugged addPointerQualifier helper function,
that was wrongly pushing the pointer qualifier at the end.

Instead, we now use the correct model::Binary::getPointerTo method.
2022-10-21 09:45:28 +02:00
Massimo Fioravanti 5d730d1411 Upgrade to support starless revng 2022-10-20 16:06:13 +02:00
Giacomo Vercesi 062272a615 Fix mime types 2022-10-11 17:36:29 +02:00
Giacomo Vercesi 72050274e2 getNamedCInstance: drop declaration parameter
In all cases this is false
2022-10-11 17:36:29 +02:00
Massimo Fioravanti fd66c32727 Add Container type registry 2022-10-03 14:26:06 +02:00
Massimo Fioravanti f1852166ab Pipeline: reworked cpp container types 2022-10-03 14:26:06 +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 ba54ff36a6 DLA: new isStridedInstance helper 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
Pietro Fezzardi 695c1529db dla::LayoutTypeSystem add eraseEdge method 2022-09-12 17:52:50 +02:00
Pietro Fezzardi 38e4658762 Add LayoutTypeSystem::NeighborIterator type 2022-09-12 12:28:48 +02:00
Pietro Fezzardi 3ec19a4a93 Add dla::OffsetExpression::append() static method 2022-09-12 12:14:52 +02:00
Pietro Fezzardi fb652dedb8 Add dla::OffsetExpression::verify() 2022-09-12 12:14:52 +02:00
Pietro Fezzardi f5ef671ecc Enforce revng check-conventions 2022-09-12 12:14:52 +02:00
Giacomo Vercesi 8e996d2394 Output PTML in revng-c
Change the output of the backend of revng-c to PTML
2022-09-01 16:59:29 +02:00
Massimo Fioravanti 14d4d4e11a Rename pipes contained in namespace pipes 2022-08-25 18:17:46 +02:00
Massimo Fioravanti 370b081c0e Moved kinds to kinds namespace 2022-08-25 17:09:15 +02:00
Pietro Fezzardi c1641afeb6 Add LayoutTypeSystem::createArtificialLayoutTypes
This helper allows creating many artifical types at once.
2022-08-09 08:02:10 +02:00
Pietro Fezzardi f8bc4a2e77 Move isCallToIsolatedFunction to FunctionTags.h 2022-08-09 08:02:10 +02:00
Pietro Fezzardi e920ef040d Switch to dyn_cast_or_null in isCallToTagged
This allows to call the function passing null pointers without crashes.
2022-08-09 08:02:10 +02:00
Alessandro Di Federico b2a0c62618 RegionCFG: rename functions to avoid conflicts 2022-08-08 16:22:14 +02:00
Ivan Krysak 2e83058e83 Update rank naming convention 2022-08-05 13:55:24 +02:00
Antonio Frighetto d9bc64b29d Introduce MakeSegmentRefPass
A simple pass that scans constant expressions and literals and
replaces them with opaque calls so that they can be easily dealt
with by the Backend, in an attempt of emitting better-looking
decompiled code.
2022-07-19 13:48:50 +02:00