Skip to content

Instantly share code, notes, and snippets.

@graydon
Forked from dcci/reducing
Created April 23, 2018 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graydon/844331571375df838af274fa44da13f4 to your computer and use it in GitHub Desktop.
Save graydon/844331571375df838af274fa44da13f4 to your computer and use it in GitHub Desktop.
Delta:
$ cat check-2.sh
#!/bin/bash
ulimit -t 3; ~/work/llvm/build-release/bin/opt -S $1 | ~/work/llvm/build-release/bin/lli
if ! test "$?" = "0"; then
exit 1
fi
ulimit -t 3; ~/work/llvm/build-release/bin/opt -sccp -S $1 | ~/work/llvm/build-release/bin/lli
if test "$?" = "0"; then
exit 1
fi
exit 0
Bugpoint:
~/work/llvm/build-release/bin/bugpoint -compile-custom -compile-command=./check-bugpoint.sh -opt-command=/home/davide/work/llvm/build-release/bin/opt 2844.c
$ cat check-bugpoint.sh
#!/bin/bash
ulimit -t 3; ~/work/llvm/build-release/bin/opt -S $1 | ~/work/llvm/build-release/bin/lli
res_old=$?
ulimit -t 3; ~/work/llvm/build-release/bin/opt -sccp -S $1 | ~/work/llvm/build-release/bin/lli
res_new=$?
[[ $res_old == 0 && $res_new != 0 ]] && exit 1
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment