[PATCH] D38154: [PassManager] Run global opts after the inliner
Michael Zolotukhin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 21:57:15 PDT 2017
mzolotukhin added a comment.
I'd recommend using LNT, here is a script with full ground-up setup for your convenience:
cd tmp
# Setup virtual environment
/usr/local/bin/virtualenv venv
. venv/bin/activate
# Checkout test-suite and LNT
for D in test-suite lnt
do
if [ ! -d "$D" ]; then
git clone http://llvm.org/git/$D
fi
done
# Install LNT
pip install -r lnt/requirements.client.txt
python lnt/setup.py develop
# Install LIT
pip install svn+http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit/
# Set some variables
SANDBOX=/Path/To/Where/LNT/Will/Run
COMPILER=/Path/To/Your/Compiler
TESTSUITE=$PWD/test-suite # We should've checked it out here
OPTSET=ReleaseLTO # Or Os, or O0-g, or ReleaseThinLTO (see test-suite/cmake/cache for other options)
# Create sandbox
mkdir $SANDBOX
cd $SANDBOX
# Fill in LNT flags
LNT_FLAGS =" --sandbox $SANDBOX"
LNT_FLAGS+=" --no-timestamp"
LNT_FLAGS+=" --use-lit=lit"
LNT_FLAGS+=" --cc $COMPILER/bin/clang"
LNT_FLAGS+=" --cxx $COMPILER/bin/clang++"
LNT_FLAGS+=" --test-suite=$TESTSUITE"
LNT_FLAGS+=" --cmake-define TEST_SUITE_BENCHMARKING_ONLY=On"
LNT_FLAGS+=" --no-auto-name '${COMPILER%.*}'"
LNT_FLAGS+=" --output \"$SANDBOX/report.json\""
LNT_FLAGS+=" -C target-arm64-iphoneos -C $OPTSET"
LNT_FLAGS+=" --cmake-define TEST_SUITE_RUN_BENCHMARKS=Off"
LNT_FLAGS+=" --build-threads 1"
LNT_FLAGS+=" --cmake-define TEST_SUITE_SUBDIRS=\"CTMark\""
# Run LNT
lnt runtest test-suite ${LNT_FLAGS}
This will test the given compiler and generate a report in report.json in the sandbox folder with the results. There is a `test-suite/utils/compare.py` script for comparing such reports, though it has additional requirements for python packages, so it might be a bit cumbersome to use it.
Michael
https://reviews.llvm.org/D38154
More information about the llvm-commits
mailing list