[llvm-commits] [llvm] r41040 - /llvm/trunk/utils/findmisopt

Reid Spencer rspencer at reidspencer.com
Sun Aug 12 23:19:52 PDT 2007


Author: reid
Date: Mon Aug 13 01:19:51 2007
New Revision: 41040

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

Modified:
    llvm/trunk/utils/findmisopt

Modified: llvm/trunk/utils/findmisopt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/findmisopt?rev=41040&r1=41039&r2=41040&view=diff

==============================================================================
--- llvm/trunk/utils/findmisopt (original)
+++ llvm/trunk/utils/findmisopt Mon Aug 13 01:19:51 2007
@@ -73,6 +73,13 @@
 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 @@
 "$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"





More information about the llvm-commits mailing list