![]() |
![]()
| ![]() |
![]()
NAMEllvm-reduce - LLVM automatic testcase reducer. SYNOPSISllvm-reduce [options] [input...] DESCRIPTIONThe llvm-reduce tool project that can be used for reducing the size of LLVM test cases. It works by removing redundant or unnecessary code from LLVM test cases while still preserving their ability to detect bugs. If input is "-", llvm-reduce reads from standard input. Otherwise, it will read from the specified filenames. LLVM-Reduce is a useful tool for reducing the size and complexity of LLVM test cases, making it easier to identify and debug issues in the LLVM compiler infrastructure. GENERIC OPTIONS
EXIT STATUSllvm-reduce returns 0 under normal operation. It returns a non-zero exit code if there were any errors. Returns 2 if the interestingness test reported the initial input was not interesting. EXAMPLEllvm-reduce can be used to simplify a test that causes a compiler crash. For example, let's assume that opt is crashing on the IR file test.ll with error message Assertion failed at line 1234 of WhateverFile.cpp, when running at -O2. The test case of test.ll can be reduced by invoking the following command: $(LLVM_BUILD_FOLDER)/bin/llvm-reduce --test=script.sh <path to>/test.ll The shell script passed to the option test consists of the following: $(LLVM_BUILD_FOLDER)/bin/opt -O2 -disable-output $1 \ (In this script, grep exits with 0 if it finds the string and that becomes the whole script's status.) This example can be generalized to other tools that process IR files, for example llc. AUTHORMaintained by the LLVM Team (https://llvm.org/). COPYRIGHT2003-2025, LLVM Project
|