User Tools

Site Tools


Same description can be found in legup_5.0/tiger/tool_source/partition_analysis/ifconv_profile_tools/README.txt

To run simple profiled if-conversion in a benchmark directory:

  1. Put “set_combine_basicblock 3” in config.tcl to enable if-conversion.
  2. make profile_ifconv (single_iteration=0/1)

Note: single_iteration is 0 by default, which means running if-conversion iteratively.

The flow of this simple profiled if-conversion: source code → run legup completely (i.e. Frontend, compiler passes including if-conversion pass, Backend) → profiler → run if-conversion iteratively based on the profiling result → run post-ifconversion compiler passes → legup Backend → verilog

To run O3 opt profiled if-conversion in a benchmark directory:

  1. Backup examples/Makefile.common
  2. Go to /ifconv_profile_tools, copy ./Makefile.common to /examples
  3. Put “set_combine_basicblock 3” in local config.tcl to enable if-conversion.
  4. make IFCONV_O3=1

To experiment the effect of running if-conversion in different orders (relative to legup passes), simply move a block of code enclosed by an if statement in ./Makfile.common (Search for “Fan” in Makefile.common).

The flow of this O3 optimized profiled if-conversion: source code → legup frontend, some compiler passes* → O3 opt + if-conversion (in the sametime if-conversion pass sets and marks load/store to volatile, if it's not volatile in input IR) → profiled iterative if-conversion → O3 opt → continue on the next legup compiler passes* → if-conversion (sets the marked volatile load/store back to nonvolatile → profiled iterative if-conversion → post-ifconversion compiler passes → legup Backend → Verilog

Final notes:

  1. The profile_ifconv target is shared between these 2 profiled if-conversion.
  2. Revelent scripts are in legup_5.0/tiger/tool_source/partition_analysis.
instructions_to_run_profiled_if-conversion.txt · Last modified: 2016/09/05 19:10 by xiefan1