Mercurial > projects > ldc
comparison bin/ldmd @ 1170:e40c65bd8c5d
Allow specific optimization passes to be requested from the command line.
Now you can run "`ldc test.d -c -mem2reg -simplifycfg`" if you feel the urge.
The -O<N> options are still supported, and are inserted in the passes list in
the position where they appear on the command line.
(so -simplifycfg -O1 -instcombine does the "right thing")
One small change: -inline is renamed to -enable-inlining due to a naming
conflict with the option to add the -inline pass. -inline now inserts the
inlining pass in the position specified, not in the middle of -O<N>.
(ldmd has been updated to translate -inline to -enable-inlining)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 29 Mar 2009 15:46:55 +0200 |
parents | 599e3d6d0dbd |
children | 17268b0a3ab0 |
comparison
equal
deleted
inserted
replaced
1169:2bff538fa3b9 | 1170:e40c65bd8c5d |
---|---|
15 | 15 |
16 declare -a ARGS | 16 declare -a ARGS |
17 IDX=0 | 17 IDX=0 |
18 for arg; do | 18 for arg; do |
19 case "$arg" in | 19 case "$arg" in |
20 -C*) | |
21 # turn -Cfoo into -foo. | |
22 # Useful for passing -inline to ldc, for instance. | |
23 arg="-${arg:2}" | |
24 ;; | |
20 -debug|-debug=*|-version=*) | 25 -debug|-debug=*|-version=*) |
21 arg="-d$arg" | 26 arg="-d$arg" |
27 ;; | |
28 -inline) | |
29 arg="-enable-inlining" | |
22 ;; | 30 ;; |
23 -fPIC) | 31 -fPIC) |
24 arg="-relocation-model=pic" | 32 arg="-relocation-model=pic" |
25 ;; | 33 ;; |
26 --a|--b|--c|--f|--r|--w|--x|--y) | 34 --a|--b|--c|--f|--r|--w|--x|--y) |