summaryrefslogtreecommitdiff
path: root/utils/findmisopt
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-05 06:10:19 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-05 06:10:19 +0000
commit90a2eb02e50f171866d03aab56db868c3f3a1cec (patch)
tree730e67bbf411917c0ebb2127c3aa36acb93101c7 /utils/findmisopt
parentb0b991a2c8addb2cca8fc2401b96e40397cdeef2 (diff)
downloadllvm-90a2eb02e50f171866d03aab56db868c3f3a1cec.tar.gz
llvm-90a2eb02e50f171866d03aab56db868c3f3a1cec.tar.bz2
llvm-90a2eb02e50f171866d03aab56db868c3f3a1cec.tar.xz
Use opt to generate the list of passes to run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/findmisopt')
-rwxr-xr-xutils/findmisopt10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/findmisopt b/utils/findmisopt
index 8ee3250eb2..2c1dc0812a 100755
--- a/utils/findmisopt
+++ b/utils/findmisopt
@@ -93,11 +93,11 @@ gcc "$s" -o "$prog" $ldflags || exit 1
ex1=$?
# Define the list of optimizations to run. This comprises the same set of
-# optimizations that gccas and gccld run, in the same order.
-all_switches="-verify -lowersetjmp -funcresolve -raiseallocs -simplifycfg -mem2reg -globalopt -globaldce -ipconstprop -deadargelim -instcombine -simplifycfg -prune-eh -inline -simplify-libcalls -argpromotion -raise -tailduplicate -simplifycfg -scalarrepl -instcombine -predsimplify -condprop -tailcallelim -simplifycfg -reassociate -licm -loop-unswitch -instcombine -indvars -loop-unroll -instcombine -load-vn -gcse -sccp -instcombine -condprop -dse -dce -simplifycfg -deadtypeelim -constmerge -funcresolve -internalize -ipsccp -globalopt -constmerge -deadargelim -inline -prune-eh -globalopt -globaldce -argpromotion -instcombine -predsimplify -scalarrepl -globalsmodref-aa -licm -load-vn -gcse -dse -instcombine -simplifycfg -verify"
-# Here's an alternative list of optimizations comprising just the ones that
-# gccld uses. To use, just comment out the line above, and uncomment this one
-#all_switches="-funcresolve -internalize -ipsccp -globalopt -constmerge -deadargelim -inline -prune-eh -globalopt -globaldce -argpromotion -instcombine -predsimplify -scalarrepl -globalsmodref-aa -licm -load-vn -gcse -dse -instcombine -simplifycfg -verify"
+# 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: //'`
+gccld_switches="-internalize -ipsccp -globalopt -constmerge -deadargelim -inline -prune-eh -globalopt -globaldce -argpromotion -instcombine -predsimplify -scalarrepl -globalsmodref-aa -licm -load-vn -gcse -dse -instcombine -simplifycfg -verify"
+all_switches="$opt_switches $gccld_switches"
+echo "Passes : $all_switches"
# Current set of switches is empty
function tryit {