Commit Graph

36 Commits

Author SHA1 Message Date
Pietro Fezzardi 93d9cbb67b Enforce new include conventions 2020-11-12 18:00:45 +01:00
Alessandro Di Federico 37fde04594 Move licensing details to LICENSE.md 2020-11-09 10:03:33 +01:00
Pietro Fezzardi 217a18edb1 Update copyright notice 2020-11-06 15:07:45 +01:00
Pietro Fezzardi cc3ed6c508 Remove all blacklisted function from decompilation 2020-10-26 14:17:02 +01:00
Pietro Fezzardi 38935f3a40 Remove functions from decompilation blacklist
We're now able to handle them, so there's no need to skip them anymore.
2020-10-26 14:13:31 +01:00
Andrea Gussoni 3128c1a4b6 Factor generateAST out as function 2020-10-26 14:07:54 +01:00
Pietro Fezzardi 6313b3229a Decompiler: fix detection of revng-c include file.
This commit fixes the detection of the revng-c include file in build
directory, using the PathList facility provided by revng.
Before this commit, running revng-c from build directory failed to
properly identify the revng-c include if it was not already installed
but only available in the build directory itself.
2020-10-12 11:42:06 +02:00
Pietro Fezzardi 66243838c8 Allow decompiling functions called bb.main
They were disabled before this commit, to work around some limitation of
an old benchmark suite.
2020-09-11 18:29:37 +02:00
Pietro Fezzardi fc98fc69f5 Fix detection of isolated functions using metadata 2020-07-22 17:27:02 +02:00
Pietro Fezzardi 1895a2de3e CDecompilerPass: fix detection of isolated funcs 2020-07-22 17:27:02 +02:00
Pietro Fezzardi f77b904d2a CDecompilerPass: remove dead code 2020-07-22 17:27:02 +02:00
Pietro Fezzardi f7e8599c5e Enforce check-conventions.sh
All commits should pass check-conventions.sh from now on.
2020-06-15 15:40:02 +02:00
Pietro Fezzardi fc2912ca32 enforce clang-format 2020-01-15 18:24:28 +01:00
Andrea Gussoni 30bc1d333e Decompile a single function
Add a flag to enable the decompilation of a single function.
In order to have a single flag shared between the `RestructureCFGPass`
and the `CDecompilerPass`, we added a new dedicated decompilation unit
called `TargetFunctionOption`.
2020-01-13 11:55:32 +01:00
Andrea Gussoni b5c00f7dfc Fix inclusion and library linking 2019-11-20 15:16:17 +01:00
Pietro Fezzardi c6c6f19535 Enforce check-conventions 2019-11-20 15:16:17 +01:00
Pietro Fezzardi 429233f054 Fix more warnings left from -Weverything 2019-11-20 15:16:17 +01:00
Andrea Gussoni 3c3ebc56a1 Fix preprocessing passes needed by DecompilerPass 2019-11-20 15:16:17 +01:00
Andrea Gussoni b214dd1921 Enforce check-conventions.sh
Replicate this commit 72f836d30079c191d1c30e185114c4c0a0f914df made by
Pietro.
2019-11-20 15:16:17 +01:00
Andrea Gussoni 560a345a2c Enforce -Weverything extensively
Replicate the changes made by this commit
f2a0df309f78e1b5d7c5f81ada5110523644559e perfomed by Pietro on the
branch containing the development fixes for `revng-c`.
2019-11-20 15:16:17 +01:00
Andrea Gussoni 4bead538a7 Collect metrics about short circuit simplification
Collection of the metrics related to the short circuit and trivial short
circuit simplification. The metrics are computed directly during the
beautify pass and later serialized on a .csv file.
2019-07-30 18:20:11 +02:00
Andrea Gussoni 9127dba961 TEMP: soft fail 2019-07-23 09:10:04 +00:00
Andrea Gussoni d7d7355f9e revng-c include file now installed
Dropped the use of a temporary file containing the necessary includes
for clang-tooling to work correctly (at the moment `#include <stdint.h>`
) in favor of a single file which is installed in `root/share/revngc`
and used by clang-tooling.
2019-05-10 17:38:05 +02:00
Andrea Gussoni 60e8c4a507 Add file serialization for decompiled functions
If the `-decompiled-prefix` is passed to the `revng opt` command the
decompilation pass takes care of serializing the decompiled code of each
function in a different file.

The filename is composed by the prefix string passed as parameter and by
the function name.
2019-05-10 17:37:18 +02:00
Pietro Fezzardi b058c326c6 Enforce coding style 2019-05-08 17:40:53 +02:00
Pietro Fezzardi 8ab637df8a Fix missing default statements from switches 2019-05-06 11:19:41 +02:00
Andrea Gussoni d9d1730f5e Improve debug information for metaregions
Improved the debugging informations provided by the restructuring pass
on the identified metaregions.
2019-04-19 10:47:14 +02:00
Andrea Gussoni 95ddb2b36b BasicBlockNode and RegionCFG now template
`BasicBlockNode` and `RegionCFG` classes are now template classes. This
means that the `BasicBlockNode` class can be used as a generic wrapper
for any type of object in the original graph (it is usually used to wrap
a `llvm::BasicBlock *` for decompilation purposes, but in tests it can
be used to wrap a `DotNode` object) that implementes `GraphTraits`.
2019-04-15 17:30:37 +02:00
Andrea Gussoni 20b380c0d1 NDuplicates passed as reference to Mark
Removed the computation of the information contained in the
`NDuplicates` prevously done in the `MarkForSerialization` pass, since
the information is now precomputed in the `RestructureCFG` pass and
exposed with a dedicated method.
2019-04-15 10:16:05 +02:00
Pietro Fezzardi ed3d1b1ab8 Properly print bool variables from stdbool.h 2019-04-05 18:52:13 +02:00
Pietro Fezzardi 28a9804143 Print int types from inttypes.h 2019-04-04 17:30:48 +02:00
Pietro Fezzardi 9e4c5f0ece Add support for functions returning structs 2019-04-02 11:57:07 +02:00
Pietro Fezzardi dadbf54631 Rework decompiler 2019-03-20 17:47:04 +01:00
Pietro Fezzardi 77a6601837 Use new MarkForSerialization in CDecompilerAction 2019-03-14 10:06:25 +01:00
Pietro Fezzardi 785638dc30 Add missing LICENSE header in file 2019-03-14 09:49:43 +01:00
Pietro Fezzardi 2640bbfeeb Use uniform naming for decompiler source files 2019-03-11 18:11:05 +01:00