[clang] [llvm] [clang-tools-extra] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 8 15:58:41 PST 2023
================
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+if [ $# -lt 1 ]; then
+ echo "Path to clang required!"
+ echo "Usage: update_thinlto_indirect_call_promotion_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))
----------------
MaskRay wrote:
Nice script!
The clean up commands may be simplified using this scheme
```
#!/bin/bash
OUTDIR=$(dirname $(realpath -s $0))
dir=$(mktemp -d)
trap "rm -r $dir" EXIT
cd $dir
cat > lib.h <<EOF
...
EOF
...
rm -f $OUTDIR/thinlto_indirect_call_promotion.profraw
LLVM_PROFILE_FILE=$OUTDIR/thinlto_indirect_call_promotion ./a.out
```
https://github.com/llvm/llvm-project/pull/74008
More information about the llvm-commits
mailing list