Skip to content
Snippets Groups Projects
  1. Oct 03, 2018
    • Alessandro Di Federico's avatar
      Abandon argparse in favor of LLVM's `CommandLine` · cc02713f
      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`.
      cc02713f
  2. Sep 20, 2018
    • Andrea Gussoni's avatar
      Register and add among JT reasons `FunctionSymbol` · 500d77f4
      Andrea Gussoni authored
      The symbol handling has been extended to register whether a symbol
      represents a function or not. This information is then used to register,
      during the global data harvesting phase, all the function symbols and
      explicitly mark them through the "FunctionSymbol" `JTReason`.
      
      We use this information during the CFEP harvesting phase to integrate
      the information produced by the function boundaries detection with
      potential unidentified CFEPs.
      
      This option can be enabled with the `--use-debug-symbols`, which
      supersedes `--use-sections`.
      500d77f4
  3. Aug 18, 2018
  4. May 29, 2018
    • Alessandro Di Federico's avatar
      Output a CSV file with the required libraries · aa382551
      Alessandro Di Federico authored
      This commit makes `revamb` produce a new file `.ll.need.csv` containing
      a list of all the dynamic libraries required by the input program. This
      will be transformed by the 'csv-to-ld-options` (was:
      `li-csv-to-ld-options`) into the appropriate linking options.
      aa382551
  5. Apr 22, 2018
    • Andrea Gussoni's avatar
      Introduce the Function Isolation Pass · cf42e497
      Andrea Gussoni authored
      This commit introduces the Function Isolation Pass. We use the
      information provided by the Function Boundaries Detection Pass to
      organize the code that `revamb` places inside the `root` function in
      different LLVM functions. To do this we obviously need to introduce some
      changes and tricks to handle the execution of the translated program.
      
      The main idea is to have two different realms (one where the isolated
      functions live, one in which we have basically the old root function).
      We start the execution from the realm of the *non isolated* functions,
      and we transfer, as soon as possible, the execution to the *isolated
      functions* realm. We then have a fallback mechanism to restore the
      execution in the right place in the *non isolated* functions realm, and
      so on.
      
      The largest change, besides the re-organization of the code in different
      functions, is the use of the exception handling mechanism provided by
      the LLVM framework in order to be able to manage the switch between the
      two realms.
      
      We also introduce the `support.h` header file, which contains a couple
      of definitions used by `support.c` and that need to be shared with some
      of the components involved in the translation process. We have defined
      some helper functions, directly in C, that we use both for handling the
      exception mechanism and for giving extra debug informations when an
      exception is raised.
      
      The `revamb-dump` utility now supports the `-i` option to specify the
      path were to save the new LLVM module.
      
      The `translate` utility now supports the `-i` option that produces a
      binary in which the function isolation has been applied.
      
      We also introduced some tests that apply the function isolation pass to
      the `Runtime/` tests already present. In this way we can verify that the
      translation and the following function isolation preserve the behavior
      of the program.
      
      When serializing the new LLVM module we regenerate the metadata used for
      debug purposes, and for doing this, since we not longer have only the
      `root` function, we have changed some details in the `DebugHelper` class
      in order to be able to emit the metadata for all the functions of our
      interest in a single shot.
      cf42e497
  6. Apr 03, 2017
    • Alessandro Di Federico's avatar
      Set CSVs linkage to internal · e0315833
      Alessandro Di Federico authored
      This simple commit should improve performance of the generated program
      sensibly. Basically all the global variables will have internal linkage
      from now on (unless the `--external` parameter is specified on the
      command line). This way, the compiler will be able to avoid load/store
      instructions when leaving code in the current translation unit.
      e0315833
    • Alessandro Di Federico's avatar
      Disable slow backend optimization · 12ed8219
      Alessandro Di Federico authored
      Introduce the `-disable-machine-licm` argument when the `translate`
      script invokes `llc` with `-O2`.
      12ed8219
  7. Mar 31, 2017
    • Alessandro Di Federico's avatar
      Install documentation · d4168436
      Alessandro Di Federico authored
      This commit introduces a docs target which translates `.rst` files into
      man pages or HTML documents and installs them in `/usr/share/man/man1`
      or `/usr/share/doc/revamb`.
      d4168436
    • Alessandro Di Federico's avatar
      docs: reflect recent changes to `root` and linking · 89d49789
      Alessandro Di Federico authored
      Update `GeneratedIRReference.rst:` to reflect recent changes to the
      `root` function. Specifically, the presence of the stack pointer
      argument and initialization of the program counter and the stack
      pointer.
      
      `FromIRToExecutable.rst` has been updated too, to take into account the
      new way we link `support.c`.
      
      Finally, the `--tracing` argument has been removed from
      `RevambUsage.rst` and the `-trace` argument is no documented in
      `TranslateUsage.rst`.
      89d49789
  8. Jan 11, 2017
Loading