Utilities and commands

This topic introduces the main utilities and commands that are included with IBM® Open XL C/C++. It does not contain all compiler utilities and commands.

Utilities

bad_file_finder (Bad File Finder)
The Bad File Finder tool performs a binary search that determines if a single file introduces a change in behavior between two different, but compatible, builds of a program. It also identifies the file in question. This tool is particularly useful when migrating or upgrading from one version of classic XL or Open XL to another or when making optimization level changes. The Bad File Finder tool is located in /opt/IBM/openxlC/17.1.3/tools and is named bad_file_finder.sh. Access the help using the command bad_file_finder.sh [-h]

For more information on Bad File Finder see Using Bad File Finder to identify changes in behavior between builds.

CreateExportList
The CreateExportList utility creates a file that contains a list of all the exportable symbols found in a given set of object files.
ibm-bugpoint
The ibm-bugpoint utility enables you to create a minimal test case that is written in LLVM intermediate language so that you can reproduce the problems you encounter when using the compiler. For details on how to use ibm-bugpoint, run this utility with the --help option. For details of the open-source LLVM bugpoint utility, see https://ibm.biz/openxl-1712-llvm-bugpoint.
ibm-clang-cpp
The ibm-clang-cpp utility is a standalone C/C++ preprocessor.
ibm-gen-list
This utility enables you to run annotated profiling with the tprof tool. ibm-gen-list generates listing files directly from binaries or object files and depends on the objdump tool to disassemble the binaries or object files. In addition, to add line numbers in listing files, use ibm-gen-list together with the llvm-dwarfdump tool. Find more information of this utility at tprof listing annotation with IBM Open XL compilers for AIX.
Note: For the objdump tool, you can either use llvm-objdump or install the GNU objdump tool from Toolbox for GNU Open Source Software.
ibm-llvm-ar
The ibm-llvm-ar utility archives several files, such as objects and LLVM bitcode files, into a single archive library that can be linked into a program. ibm-llvm-ar has the same functionality as the open-source LLVM llvm-ar utility. For details of llvm-ar, see https://ibm.biz/openxl-1712-llvm-ar.
ibm-llvm-cov
The ibm-llvm-cov utility reads files that contain code coverage information and displays the code coverage details for programs that have been instrumented to generate profile data. ibm-llvm-cov gcov has the same functionality as the open-source LLVM llvm-cov gcov utility. However, unlike llvm-cov, ibm-llvm-cov supports only the gcov command and does not offer support for any other commands. For details of llvm-cov gcov, see https://ibm.biz/openxl-1712-llvm-cov.
ibm-llvm-cxxfilt
The ibm-llvm-cxxfilt utility is a symbol demangler that decodes mangled names generated by IBM Open XL C/C++. It replaces the c++filt name demangling utility that was shipped in IBM XL C/C++ for AIX® 16.1.0 and earlier releases. The utility does not demangle symbol names generated by xlC or its equivalent invocation commands in IBM XL C/C++. For details on how to use ibm-llvm-cxxfilt, run the utility with the --help option. For details of the open-source LLVM llvm-cxxfilt utility, see https://ibm.biz/openxl-1712-llvm-cxxfilt.
ibm-llvm-extract
The ibm-llvm-extract utility extracts the bitcode of specified functions from a given LLVM bitcode file. It is primarily used as a debugging tool to reduce test cases from large programs. Additionally, this utility removes unreachable global variables, prototypes, and unused types from the function bitcode. ibm-llvm-extract has the same functionality as the open-source LLVM llvm-extract utility. For details of llvm-extract, see https://ibm.biz/openxl-1712-llvm-extract.
ibm-llvm-profdata
The ibm-llvm-profdata utility is used for handling profile data files. It has several subcommands, described as follows:
  • The ibm-llvm-profdata show utility takes a profile data file and displays Profile-Guided Feedback (PGO) information in this file.

    ibm-llvm-profdata show --tls displays the profile data in the specified Thread Local Storage (TLS) profile file. ibm-llvm-profdata show --tls -tls-var-name=, where the input is a regular expression, shows the profile data of TLS variables whose names match the input regular expression. The specified TLS profile file can either be a raw TLS profile file with the .gv suffix or a merged TLS profile file. For details of PGO optimization for TLS variables, see PGO optimization for Thread Local Store variables.

  • The ibm-llvm-profdata merge utility takes several profile data files generated by PGO instrumentation and merges them into a single indexed profile data file.

    ibm-llvm-profdata merge --tls merges several TLS profile files generated by -fprofile-local-exec-tls to produce a single profile file that can be used by the compiler through -flocal-exec-tls-profile-use. The specified TLS profile file can either be a raw TLS profile file with the .gv suffix or a merged TLS profile file. For details of PGO optimization for TLS variables, see PGO optimization for Thread Local Store variables.

  • The ibm-llvm-profdata overlap utility takes two profile data files and displays the overlap of counter distribution between the entire files and among any of the specified functions.
  • The ibm-llvm-profdata clean utility takes the specified profile data files and deletes them. This utility deletes raw profile data files or instrumented profile data files created by the ibm-llvm-profdata merge utility. If a directory is specified, the utility removes all profile data files within that directory. However, it does not delete text-format profile data files or any profile files generated by IBM XL C/C++ for AIX 16.1.0 or earlier releases.
For details on how to use ibm-llvm-profdata, run this utility with the --help option. For details of the open-source LLVM llvm-profdata utility, see https://ibm.biz/openxl-1712-llvm-profdata.
ibm-llvm-ranlib
The ibm-llvm-ranlib utility is an alias for ibm-llvm-ar that generates an index for one or more archives. ibm-llvm-ranlib has the same functionality as the open-source LLVM llvm-ranlib utility. For details of llvm-ranlib, see https://ibm.biz/openxl-1712-llvm-ranlib.
ibm-llvm-reduce
The ibm-llvm-reduce utility can reduce the size and complexity of LLVM test cases, making it easier to identify and debug issues in the LLVM compiler infrastructure. ibm-llvm-reduce has the same functionality as the open-source LLVM llvm-reduce utility. For details of llvm-reduce, see https://ibm.biz/openxl-1712-llvm-reduce.
ibm-llvm-symbolizer
This utility reads object file names and addresses from the command line and prints corresponding source code locations to standard output. ibm-llvm-symbolizer has the same functionality as the open-source LLVM llvm-symbolizer utility. For details of llvm-symbolizer, see https://ibm.biz/openxl-1712-llvm-symbolizer.
Note: These compiler utilities are shipped in the /opt/IBM/openxlC/17.1.3/bin/ directory with the exception of the following ones, which are shipped in the /opt/IBM/openxlC/17.1.3/tools/ directory.
  • ibm-bugpoint
  • ibm-gen-list
  • ibm-llvm-ar
  • ibm-llvm-cxxfilt
  • ibm-llvm-ranlib
  • ibm-llvm-symbolizer

Commands

xlCndi
The xlCndi script installs IBM Open XL C/C++ to a nondefault directory location. For more information, see Updating an advanced installation using xlCndi in the IBM Open XL C/C++ Installation Guide.