The AOR tool generates an optimization report for any C, C++, and Fortran application project compiled with AOCC. The optimization report can be investigated by the application developer for a list of optimizations performed/not performed on the compiled application with a hint of the course of action. Currently, AOR contains the report of messages related to loop-vectorize optimization pass information and can be generated with the following commands.
| Command | Description |
|---|---|
|
To generate compile-time AOR (CFLAGS,
CXXFLAGS, and FCFLAG). |
|
To generate link-time AOR (CFLAGS,
CXXFLAGS, and FCFLAG). |
|
To screen list compile and link-time AOR (CFLAGS, CXXFLAGS, and
FCFLAG). It displays the AOR
reports when used with the flag -fgen-aor. |
Example
$ git clone https://github.com/UoB-HPC/TSVC_2
$ cd TSVC_2/src
$ clang -O3 -march=znver2 -fgen-aor -flto -fuse-ld=lld *.c -I. -o tsvc -lm
The above commands will generate a compile-time report optimization_report.aor and a link-time report optimization_ld_report.aor, respectively in the application project
build directory.
The following commands will generate a compile-time report optimization_report.aor and a link-time report optimization_ld_report.aor, respectively in the
application project build directory and display the AOR reports.
$ git clone https://github.com/UoB-HPC/TSVC_2
$ cd TSVC_2/src
$ clang -O3 -march=znver2 -fgen-aor -fgen-aor-screen-listing -flto -fuse-ld=lld *.c -I. -o tsvc -lm
Sample AOR Artifact Content
**************************************************************************************
**************************************************************************************
Source location : sv.c:470:5
Optimizer Passname : loop-vectorize
Function Name : Perl_reg_temp_copy
loop-vectorize Optimization Status : Failed
Reason for loop-vectorize Optimization Failure : the cost-model indicates that interleaving is
not beneficial
**************************************************************************************
**************************************************************************************
Source location : mg.c:396:2
Optimizer Passname : loop-vectorize
Function Name : Perl_regexec_flags
loop-vectorize Optimization Status : Failed
Reason for loop-vectorize Optimization Failure : value that could not be identified as
reduction is used outside the loop
**************************************************************************************
**************************************************************************************
Prerequisites
For more information on prerequisites, refer to AOR Prerequisites (Table 2).
AOCC compiler must be installed and environment variables set. For more information, refer to Installation.
Alternatively, you can also export the AOCC compiler and the AOR tool (opt-viewer.py) paths to ensure that the correct
compiler and associated tool are used to generate the AOR artifact.