Giter VIP home page Giter VIP logo

functionopt's Introduction

Function Call Optimization

Function call optimization tool for SimpleC.

Requirements

  • Java Development Kit (JDK) 8+
  • Maven
  • Graphviz

Build

Run the following command in the root of this repository:

mvn package

Usage

Use Java to run the archive:

java -jar target/opt.jar 

Specify what do you want to do:

Usage: opt [COMMAND]
Commands:
  call-graph, cg  Create call graph.
  inline, in      Inline function calls.
  tail-call, tc   Optimize tail calls.
  unroll, un      Unrolls recursion.

Call Graph

Usage: opt call-graph -o=<file> <input>
Create call graph.
      <input>           Input SimpleC source file.
  -o, --output=<file>   The output file.

Inline Calls

Usage: opt inline -a=<dir> [-b=<dir>] [-c=<int>] [-s=<int>] <input>
Inline function calls.
      <input>              Input SimpleC source file.
  -a, --after=<dir>        Output directory for CFGs of the optimized input.
  -b, --before=<dir>       Output directory for CFGs of the original input.
  -c, --call-limit=<int>   Max. number of calls a function can receive to be inlined.
  -s, --size-limit=<int>   Max. number of transitions a function can have to be inlined.

Optimize Tail Calls

Usage: opt tail-call -a=<dir> [-b=<dir>] <input>
Optimize tail calls.
      <input>          Input SimpleC source file.
  -a, --after=<dir>    Output directory for CFGs of the optimized input.
  -b, --before=<dir>   Output directory for CFGs of the original input.

Unroll Recursion

Usage: opt unroll -a=<dir> [-b=<dir>] [-l=<int>] <input>
Unrolls recursion.
      <input>          Input SimpleC source file.
  -a, --after=<dir>    Output directory for CFGs of the optimized input.
  -b, --before=<dir>   Output directory for CFGs of the original input.
  -l, --limit=<int>    Max. number of calls to unroll in one function.

Libraries

This project uses:

Authors

  • Jan Svoboda
  • Christian Kjær Larsen

functionopt's People

Contributors

christiankjaer avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.