summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Pfaffe <philip.pfaffe@gmail.com>2018-05-02 15:27:32 +0000
committerPhilip Pfaffe <philip.pfaffe@gmail.com>2018-05-02 15:27:32 +0000
commitf1fadea5cec7e3b49de653c648e1a63436513894 (patch)
treef228edbf49e3cf873465eafe9674e2177e1b7d39
parente9ca17e9b6419c6980a232537fa0fed419c884c7 (diff)
downloadbcm5719-llvm-f1fadea5cec7e3b49de653c648e1a63436513894.tar.gz
bcm5719-llvm-f1fadea5cec7e3b49de653c648e1a63436513894.zip
Pass compiler arguments in the create_ll.sh script
Summary: Occasionally you need an include or similar things to be configured when making a new testcase. Allow passing these to the script and down to the compiler calls. Reviewers: grosser, Meinersbur, bollu Reviewed By: Meinersbur Subscribers: bollu, llvm-commits, pollydev Differential Revision: https://reviews.llvm.org/D46359 llvm-svn: 331364
-rwxr-xr-xpolly/test/create_ll.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/polly/test/create_ll.sh b/polly/test/create_ll.sh
index 3ed6fc73044..f4aa409fef3 100755
--- a/polly/test/create_ll.sh
+++ b/polly/test/create_ll.sh
@@ -2,8 +2,11 @@
LLFILE=`echo $1 | sed -e 's/\.c/.ll/g'`
LLFILE_TMP=${LLFILE}.tmp
+SOURCE=$1
-clang -c -S -emit-llvm -O3 -mllvm -disable-llvm-optzns $1 -o ${LLFILE}
+shift
+
+clang -c -S -emit-llvm -O3 -mllvm -disable-llvm-optzns ${SOURCE} -o ${LLFILE} "$@"
opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars \
-instnamer ${LLFILE} -S -o ${LLFILE_TMP}
@@ -17,7 +20,7 @@ echo '; FIXME: Edit the run line and add checks!' >> ${LLFILE}
echo ';' >> ${LLFILE}
echo '; XFAIL: *' >> ${LLFILE}
echo ';' >> ${LLFILE}
-clang-format $1 | sed -e 's/^[^$]/; &/' -e 's/^$/;/' >> ${LLFILE}
+clang-format ${SOURCE} | sed -e 's/^[^$]/; &/' -e 's/^$/;/' >> ${LLFILE}
echo ';' >> ${LLFILE}
cat ${LLFILE_TMP} >> ${LLFILE}
OpenPOWER on IntegriCloud