Add script for performance-guided optimization. Ignore pgo files.

Thanks to @gwern & @FeepingCreature for showing this to me.
This commit is contained in:
Geoff Greer 2017-01-28 12:56:01 -08:00
parent 8639866dcc
commit ee56182f61
2 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
*.dSYM
*.gcda
*.o
*.plist
.deps

12
pgo.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
set -e
cd "$(dirname "$0")"
make clean
CFLAGS="$CFLAGS -fprofile-generate"
./build.sh
./ag example ..
make clean
CFLAGS="$CFLAGS -fprofile-use"
./build.sh