[polly] r331364 - Pass compiler arguments in the create_ll.sh script

Philip Pfaffe via llvm-commits llvm-commits at lists.llvm.org
Wed May 2 08:27:32 PDT 2018


Author: pfaffe
Date: Wed May  2 08:27:32 2018
New Revision: 331364

URL: http://llvm.org/viewvc/llvm-project?rev=331364&view=rev
Log:
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

Modified:
    polly/trunk/test/create_ll.sh

Modified: polly/trunk/test/create_ll.sh
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/create_ll.sh?rev=331364&r1=331363&r2=331364&view=diff
==============================================================================
--- polly/trunk/test/create_ll.sh (original)
+++ polly/trunk/test/create_ll.sh Wed May  2 08:27:32 2018
@@ -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
 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}




More information about the llvm-commits mailing list