Skip to content

Latest commit

 

History

History
48 lines (29 loc) · 880 Bytes

README.md

File metadata and controls

48 lines (29 loc) · 880 Bytes

Loop Quasi-Invariant Chunk Motion

This is a pass which computes the invariance degree of each statement in loops and inner loops in a way to peel them.

With a relation composition, it is able to hoist an entire invariant or quasi-invariant inner loop.

Prerequisites

This uses the pycparser.

Installation

Install project dependencies by running the following command:

python -m pip install -r requirements.txt

Run on examples:

$ python LQICM.py yourfile.c

Example:

$ python LQICM.py c_files/example2.c

Remark:

The .c file given needs to contain only functions (no includes or other macros etc…)

Testing

To run unit tests locally run:

python LQICM.py

There will be no output if all tests pass.

For verbose test output run

python -m doctest -v test_examples.txt