- Nov 14, 2018
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
In QEMU we should suppress the emission of the debug_insn pseudo-instruction (which delimits the tiny code instructions corresponding to an original input instruction) in case of a delay slot. However, this was not happening due to a wrong `#ifdef`. Since this has now been fixed in QEMU, this commit updates the results of the tests accordingly.
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
`DebugAnnotationWriter` creates debug information for each instruction in the generated LLVM IR module. Before this commit, it used to clobber any debug information in any function, which lead to wrong debug information on helper functions. This commit ensures that debug information of helper functions are untouched, so that they can be used while debugging.
-
- Nov 13, 2018
-
-
Pietro Fezzardi authored
Updating to LLVM 7 mainly involved the following steps: * Upgrade APIs for folding ConstantExpr. * Upgrade APIs for GraphTraits. * Upgrade APIs for DominatorTreeBase. * Upgrade APIs for BinaryFormat to parse ELFs. * Fix the LLVM Linker to properly link the QEMU helpers. * Disable the new optnone attribute even with optimization -O0. This is necessary to allow SROA to do its job properly. * Upgrade APIs to delete Instructions. * Properly cleaning up orphaned metadata still referring to Instructions that have been destroyed. Recent versions of LLVM are more strict in this respect, and will assert when compiled in debug. * Avoid using LLVM `getGlobalContext` which has been removed from newer versions of LLVM. * Upgrade tests to use the new APIs. * Upgrade APIs for instruction iterators and reverse iterators.
-
- Oct 24, 2018
-
-
Alessandro Di Federico authored
A method in RDA was returning nullptr when a basic block *had* a color and a dangling reference when it did not.
-
- Oct 16, 2018
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
This commit reimplements the (conditional) reaching definitions passes as an instance of a monotone framework. The `ConditionNumberingPass` has also been reworked in the way it exposes its results, but it's otherwise unchanged. A proper unit testing framework is also available to ensure everything works as supposed to.
-
Alessandro Di Federico authored
An `assert` used to check the type of a deleted object. This commit delays the deletion of such object.
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
In case of a top `BoundedValue` which appears to be used with an inconsistent signedness, simply change the signedness and keep it to top.
-
Alessandro Di Federico authored
This message used to be emitted unconditionally. It is now emitted only as appropriate.
-
Alessandro Di Federico authored
This commit introduces a new logger that prints out the name and reason for each newly registered basic block.
-
Alessandro Di Federico authored
This commit simply adds a couple of handy methods to `MonotoneFrameworkSet` such as `begin`, `end`, `erase`, `erase_if`, `contains` and `size`.
-
Alessandro Di Federico authored
In a `MonotoneFramework` it is sometimes necessary to change the information propagated on a branch w.r.t. another branch. This commit introduces the `handleEdge` function that allows `MonotoneFramework` implementors to modify the `LatticeElement` produced by `transfer`.
-
Alessandro Di Federico authored
`dumpModule` is a debug function that can be called from GDB to dump a `Module *` to a chosen path.
-
Alessandro Di Federico authored
Through `JumpTargetManager::setCFGForm` the `root` function CFG can be changed so that the `dispatcher` is minimized, i.e., it jumps only to those basic blocks that would be otherwise unreachable. This allows us to perform more accurate and simpler analyses. To bring the function in this state we used to check if there was at least a non-dispatcher predecessor, however this did not work with loops reachable only from the dispatcher, since they had a predecessor, but that didn't mean it was reachable from the entry. This commit fixes the problem by navigating the CFG in reverse-post order, registering all the reachable blocks and then restoring the edge from the dispatcher to those that are not reachable. Additionally: * Basic blocks with no predecessors are now purged before `JumpTargetManager::harvest`. * The `CFGForm` enum is now a namespace.
-
Alessandro Di Federico authored
`MonotoneFramework.h` has been moved into `include/revng/Support` so that it can be employed by components outside `libStackAnalysis`.
-
- Oct 03, 2018
-
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
This commit also fixes a bug due to some problem in how we were building the self-referencing metadata associated to `alias.scope`.
-
Alessandro Di Federico authored
`InlineAsm` instructions resemble function calls. You also have to provide the prototype of the called function. Before this commit, we were employing `void(void)`, which was wrong since we were passing in a CSV. In this commit we add a pointer argument to this prototype, which prevents an assertion in LLVM from being triggered.
-
Alessandro Di Federico authored
In stack analysis' output, the list of basic blocks composing a function was not sorted. This lead a test to fail due to the presence of the `--order` flag when comparing the output. This commit ensures that this list is ordered, by basic block name.
-
Alessandro Di Federico authored
Update an assertion trying to enforce the fact that `alloca`s copied from `root` where in the original entry block, while they should be in the `dummy` entry block. Additionally, an improvement has been introduced which ensures only one `alloca` is copied per-function, while, before, we were creating a new `alloca` for each use in that function.
-
Alessandro Di Federico authored
This commit dismisses the `argparse` library (the only non-runtime C component of rev.ng) in favor of LLVM's CommandLine library, which offers several benefits. Among others, now command line arguments can be easily specified as a global variable, decentralizing their management and avoiding the long list of arguments in the constructor of singleton objects such as `CodeGenerator`.
-
Alessandro Di Federico authored
This commit introduces `revng_log`, a macro analagous to `revng_assert`, which basically allows to have the benefit of the `Logger` class without having to compute the expression to log if the logger is disabled. This commit also completely dismisses the `DBG` macro, converting all the old code to `Logger` + `revng_log`.
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
In `support.c`, we employ `arch_prctl` to set the value of segment registers. However glibc, despite providing that function, doesn't provide its prototype in any header file. This commit declares it, according to the declaration provided in the man page.
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
This commit moves around most files. The new directory structure is as follows: * `lib/$LIBRARY/`: contains a library, i.e., a set of `.cpp` files used by multiple libraries/tools. * `include/revng/$LIBRARY/`: contains the public headers associated to the library in `lib/$LIBRARY/`. * `tools/$TOOL/`: directory where all the `.cpp` files (and private headers) for a tool reside. Currently we have two tools: `revamb` and `revamb-dump`. On top of this, all file names are now in camel case.
-
- Sep 29, 2018
-
-
Alessandro Di Federico authored
This commit checks if valgrind headers are available and, if so, defines a macro. In this way, if the heders are not available, `valgrindhelper.h` can be aware of this fact and become a no-op.
-
Alessandro Di Federico authored
Many of the previous commits are aimed at suppressing several compiler warnings. This commit updates the set of warning we want to have.
-
Alessandro Di Federico authored
`FunctionPass` has a static field `ID`. In templated passes, this needs to be declared in the header file and defined in a `.cpp` file. This does this, the right way.
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
This commit suppresses a warning due to the fact that an instance of `std::integral_context` embedding `dlclose` was missing the `noexcept` specifier in the type, due to a `decltype` limitation.
-
Alessandro Di Federico authored
This commit introduces a trick for having optional arguments in macros. This enables the `revng_abort` and `revng_unreachable` macros to have 0 or 1 argument, and the `revng_assert` and `revng_check` macros to have 1 or 2 arguments. Note that, by employing a macro trick (instead of C++ default arguments), we keep the header compatible with C files.
-
Alessandro Di Federico authored
The macro invoking ``__builtin_assume` was using the expression passed by the user to the builtin directly. This commit introduces an explicit cast to `bool`, which is sometimes required.
-
Alessandro Di Federico authored
`clang-format` tends to make fit as much content as possible within a line, even splitting string literals. However, this is not legal for `_Pragma` expressions. This commit disables `clang-format` in the portion of code using `_Pragma`.
-
Alessandro Di Federico authored
-
Alessandro Di Federico authored
This commit enforces, through `scripts/check-conventions.sh`, the absence of `assert(false)` and direct calls to `assert`, `abort` and `llvm_unreachable`.
-