Files
clang-p2996/clang/test/CodeGen/Inputs/update_memprof_inputs.sh
Snehasish Kumar e99b5ad383 [memprof] Add scripts to automate testdata regeneration.
The memprof profiles and binaries need to be updated in case of version
updates. This change adds three scripts for llvm-profdata, clang and
llvm tests where memprof profiles are used as inputs. Also update the
tests, profiles and binaries in this change. Change based on the review
suggestions in D145023.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D145644
2023-03-09 19:54:23 +00:00

18 lines
641 B
Bash
Executable File

#!/bin/bash
if [ -z $1 ]; then
echo "Path to clang required!"
echo "Usage: update_memprof_inputs.sh /path/to/updated/clang"
exit 1
else
CLANG=$1
fi
# Allows the script to be invoked from other directories.
OUTDIR=$(dirname $(realpath -s $0))
DEFAULT_MEMPROF_FLAGS="-fuse-ld=lld -Wl,--no-rosegment -gmlt -fdebug-info-for-profiling -fmemory-profile -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -Wl,-build-id -no-pie"
${CLANG} ${DEFAULT_MEMPROF_FLAGS} ${OUTDIR}/../memprof.cpp -o ${OUTDIR}/memprof.exe
env MEMPROF_OPTIONS=log_path=stdout ${OUTDIR}/memprof.exe > ${OUTDIR}/memprof.memprofraw