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
7ab10df8f9
Remove useless location definitions for arguments
...
The actual ptml::attributes::LocationDefinition for arguments is already
generated when emitting the prototype of the functions.
The removed calls were just serializing the location definition once
more and disposing of it without serializing it anywhere.
2022-11-15 15:54:20 +01:00
Pietro Fezzardi
992302e9e3
ModelTypeNames.cpp: no space after ptr return type
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
690056a4a6
DecompileFunction.cpp: 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
4334481894
UpcastablePointer: upcast with mutable callables
2022-11-15 14:15:20 +01:00
Pietro Fezzardi
fb7edef129
Add ptml::scopeTag helper function
2022-11-15 14:15:20 +01:00
Pietro Fezzardi
6734494bad
Move scopeTag helper function to revng
2022-11-15 14:03:07 +01:00
Pietro Fezzardi
b9647e4804
Merge branch 'feature/kinds-expose-locations'
2022-11-11 15:34:19 +01:00
Alessandro Di Federico
7db60e68d2
Merge branch 'feature/kinds-expose-locations'
2022-11-11 14:25:31 +01:00
Giacomo Vercesi
7526d72492
Kinds: exposed locations produced
...
Expose the locations that can be found in each kind
2022-11-11 13:43:55 +01:00
Giacomo Vercesi
d185fc80ac
Rank: fix RankConvertibleTo with RootRank
...
RankConvertibleTo would be erroneously fail when used with a RootRank
either in the From or To template parameter.
2022-11-11 13:43:55 +01:00
Alessandro Di Federico
ee3a8af90a
Merge branch 'feature/avi-performance'
2022-11-10 19:41:56 +01:00
Massimo Fioravanti
fa30486ce0
Outliner: create extractor cache once
2022-11-10 19:41:42 +01:00
Massimo Fioravanti
ad0f1163b2
AVI: increase performance by caching successors
2022-11-10 19:40:11 +01:00
Giacomo Vercesi
e516d245c3
ModelToHeader: model functions are referenced
...
Change the output of ModelToHeader in regards to model functions: they
are referenced there while defined in the function-specific decompiled C
code
2022-11-10 17:27:53 +01:00
Giacomo Vercesi
6e8333ed62
Kinds: add new Location/definitionKind info
2022-11-10 17:27:53 +01:00
Pietro Fezzardi
4b4531027b
DecompileFunction.cpp: support PoisonValue
2022-11-10 13:05:51 +01:00
Pietro Fezzardi
8497ab4b88
MakeModelGEP: don't crash on undef and poison
2022-11-10 13:05:51 +01:00
Pietro Fezzardi
38cb917b87
Revive RemoveLLVMAssumeCallsPass
...
This pass remove calls to `llvm.assume` which are introduced by stack
promotion for stack alignment.
2022-11-10 12:07:37 +01:00
Pietro Fezzardi
cf6be43571
Support void types in areMemOpCompatible
2022-11-09 17:00:14 +01:00
Pietro Fezzardi
70a6185ce8
DLA/Frontend: don't skip calls with 0 uses
...
Before this commit we were not adding nodes to DLATypeSystem for calls
with 0 uses.
This commit fixes the problem, and only avoids adding nodes for calls
that return void.
2022-11-09 16:23:34 +01:00
Pietro Fezzardi
0f8c07e71a
DecompileFunction.cpp: fix typedef traversal
...
Before this commit, to emit field member accesses and array accesses in
C we performed a broken traversal of typedefs.
It was buggy since its inception but it was never triggered because no
typedefs actually reached this point.
This commit fixes that using the reworked peelConstAndTypedefs
machinery.
2022-11-09 12:02:26 +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
eef93f2a85
InitModelTypes: handle CABIFunctionType
...
Before this commit, the code assumed that whenever we had multiple
return types on the model we had an aggregate return type also in LLVM
IR. This is not true anymore with CABIFunctionType, where many model
types can be stuffed into a single wide integer in LLVM IR.
This commit fixes the code to be able to handle that situation.
2022-11-09 11:59:51 +01:00
Pietro Fezzardi
35b8d1b298
MakeModelGEP: avoid crash on function pointers
2022-11-08 14:09:07 +01:00
Pietro Fezzardi
9440aa434d
DLA: pointer edges only for pointer-sized nodes
...
Before this commit, the creation of intra-procedural types and edges
was too liberal, possibly leading to creation of pointer edges starting
from nodes that were not pointer-sized.
This commit fixes the issue, never creating outgoing pointer edges from
non-pointer-sized nodes.
2022-11-08 11:47:50 +01:00
Antonio Frighetto
9aa9007f18
DLA/Backend: do not add new overlapping fields
...
Make sure we do not introduce new fields that overlap the
original ones, should they exist.
2022-11-03 14:47:47 +01:00
Pietro Fezzardi
994280ba34
DLA: fix slack in CompactCompatibleArrays
...
Before this commit, a logic mistake made the AvailableSlack too large
for arrays that started near the beginning of their parent.
This in turn allowed a compacted array to "underflow" on lower addresses
w.r.t. the parent.
This commit fixes the problem by properly computing the AvailableSlack,
restraining it in cases where the array under analysis is close to the
beginning of the parent.
2022-11-03 13:23:59 +01:00
Alessandro Di Federico
91c4bdcd79
Merge branch 'feature/revng-distributable-revamp'
2022-11-02 11:51:35 +01:00
Giacomo Vercesi
48cd3aad42
revng.cli: init commands_registry once
...
Only init commands_registry once, this is to avoid commands being
re-registered and allow quicker execution of nested commands.
2022-11-02 11:50:40 +01:00
Giacomo Vercesi
dad9dbcec8
getCurrentRoot: improve /proc/self/maps parsing
...
This fixes a behavior in getCurrentRoot that would lead it to reporting
an incorrect path if revng was installed in a path with spaces.
2022-11-02 11:50:40 +01:00
Giacomo Vercesi
4af389c703
daemon-self-test: fix daemon output
...
Fix the `fail` function, to properly capture the output of the daemon
process in case of failure.
2022-11-02 11:50:40 +01:00
Giacomo Vercesi
4ae8df0ad2
Yield disassembler: drop support for AMDGPU
2022-11-02 11:50:40 +01:00
Massimo Fioravanti
e24fdbd446
revng-artifact: handle binaries with 0 functions
...
When revng-artifact is requested to produce the functions of a binary
that had 0 functions, it crashed. This commit fixes it by checking if
something has been actually being produced.
2022-11-02 10:47:33 +01:00
Pietro Fezzardi
2c228a52d5
DLA: avoid copies in SimplifyInstanceAtOffset0
...
This commits starts using llvm::df_iterator explicitly, and to use its
skipChildren method to prevent unnecessary copies and speed up the
algorithm.
2022-11-02 08:14:59 +01:00
Massimo Fioravanti
10ab39664d
Runner: postpone logging after checks
2022-10-31 16:47:33 +01:00
Pietro Fezzardi
73210ab4ae
Adopt TupleTreeReference caching
2022-10-31 09:08:17 +01:00
Alessandro Di Federico
bb2abcc9ea
Merge branch 'feature/graphql-invalidations'
2022-10-30 09:14:22 +01:00
Giacomo Vercesi
0b80801b2b
TupleTreeDiff: applyDiff uses ErrorList
...
Change how TupleTreeDiff and Visitor work so they can populate an
ErrorList in case the deserialization/apply of a diff fails.
2022-10-30 09:13:44 +01:00
Giacomo Vercesi
2c4f5d1381
GraphQL: introduce target endpoint
2022-10-30 09:13:34 +01:00
Giacomo Vercesi
de76a5239b
PipelineC: improve documentation
2022-10-30 09:13:29 +01:00
Giacomo Vercesi
a75fc40abe
PipelineC: drop rp_manager_create_memory_only
...
The function was unused, broken and superseded by the other
rp_manager_create with `execution_directory=nullptr`.
2022-10-30 09:13:23 +01:00
Giacomo Vercesi
81d25f9805
PipelineC: expose invalidation logic
2022-10-30 09:13:14 +01:00