diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-08-13 06:19:51 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-08-13 06:19:51 +0000 |
commit | f6101ac7bcb06ec3488bd5afab38f20ae6855e35 (patch) | |
tree | c7c19980908082ce5177b30f0b2c54a99bf98765 /utils/findmisopt | |
parent | 5c1b53399f13040dbc1081a459de22b5d7545c71 (diff) | |
download | external_llvm-f6101ac7bcb06ec3488bd5afab38f20ae6855e35.zip external_llvm-f6101ac7bcb06ec3488bd5afab38f20ae6855e35.tar.gz external_llvm-f6101ac7bcb06ec3488bd5afab38f20ae6855e35.tar.bz2 |
Make use of the llvm-ld tool's new ability to read input from stdin to extract
the list of link time passes to be run, just as for opt, with the
-debug-pass=Arguments option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/findmisopt')
-rwxr-xr-x | utils/findmisopt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/findmisopt b/utils/findmisopt index a2f77a3..b7ffbd9 100755 --- a/utils/findmisopt +++ b/utils/findmisopt @@ -73,6 +73,13 @@ echo "Test Name: $name" echo "Unoptimized program: $prog" echo " Optimized program: $optprog" +# Define the list of optimizations to run. This comprises the same set of +# optimizations that opt -std-compile-opts and gccld run, in the same order. +opt_switches=`llvm-as < /dev/null -o - | opt -std-compile-opts -disable-output -debug-pass=Arguments 2>&1 | sed 's/Pass Arguments: //'` +ld_switches=`llvm-as < /dev/null -o - | llvm-ld - -debug-pass=Arguments 2>&1 | sed 's/Pass Arguments: //'` +all_switches="$opt_switches $ld_switches" +echo "Passes : $all_switches" + # Create output directory if it doesn't exist if [ -f "$outdir" ] ; then echo "$outdir is not a directory" @@ -92,13 +99,6 @@ gcc "$s" -o "$prog" $ldflags || exit 1 "$prog" $args > "$out" 2>&1 <$input ex1=$? -# Define the list of optimizations to run. This comprises the same set of -# optimizations that opt -std-compile-opts and gccld run, in the same order. -opt_switches=`llvm-as < /dev/null -o - | opt -std-compile-opts -disable-output -debug-pass=Arguments 2>&1 | sed 's/Pass Arguments: //'` -ld_switches=`llvm-as < /dev/null -o - | llvm-ld - -std-link-opts -disable-output -debug-pass=Arguments 2>&1 | sed 's/Pass Arguments: //'` -all_switches="$opt_switches $ld_switches" -echo "Passes : $all_switches" - # Current set of switches is empty function tryit { switches_to_use="$1" |