Pass bisection

This document describes a feature for the bisection tool, which provides pass and transformation level bisection for a bad object file.

Before reading this document, please refer to README.bisect for general usage of the bisection tool.

The benefit of using pass level bisection is: When building a bad object file, it can tell you which pass and transformation in the compiler caused the error.

Notice: This tool will only work for LLVM/clang, since it is using options -opt-bisect-limit and print-debug-counter that only exist in LLVM.


All the required arguments in object-file-level bisection tool are still to be provided. In addition, you will need to add the following arguments:

  1. --pass_bisect: enables pass level bisection
  2. --ir_diff: enables output of IR differences

Please refer to --help or the examples below for details about how to use them.


TODO - Future work: Currently this only works for Android.

HOW TO USE: Android

  1. Prerequisites: A general setup is still needed for Android, which means that you need to populate good and bad set of objects with two versions of compilers.

    See the documentation in for more detailed instructions.

  2. Pass/Transformation Bisection: If you do not wish to override the other arguments, this command should be sufficient to do pass/transformation level bisection:



        Enables pass/transformation level bisection and with default
        script to generate the command as ‘android/’.
        For now, prune must be set to False to return only the first
        bad item.
        Optional argument to print out IR differences.
        To show IR diff, verbose needs to be on.

    Other default arguments:


    You can always override them if needed. See README.bisect for more details.

  3. Other features: Features such as resuming, number of jobs, and device id remain the same as before. See README.bisect for more details.