Mercurial > projects > ldc
comparison dmd2/mars.h @ 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 | f0b6549055ab |
children | 638d16625da2 |
comparison
equal
deleted
inserted
replaced
1169:2bff538fa3b9 | 1170:e40c65bd8c5d |
---|---|
71 { | 71 { |
72 bool obj; // write object file | 72 bool obj; // write object file |
73 bool link; // perform link | 73 bool link; // perform link |
74 bool verbose; // verbose compile | 74 bool verbose; // verbose compile |
75 char symdebug; // insert debug symbolic information | 75 char symdebug; // insert debug symbolic information |
76 #if !IN_LLVM | |
77 // LDC uses a different mechanism | |
76 bool optimize; // run optimizer | 78 bool optimize; // run optimizer |
77 char optimizeLevel; // optimization level | 79 char optimizeLevel; // optimization level |
80 #endif | |
78 ARCH cpu; // target CPU | 81 ARCH cpu; // target CPU |
79 OS os; // target OS | 82 OS os; // target OS |
80 bool is64bit; // generate 64 bit code | 83 bool is64bit; // generate 64 bit code |
81 bool isLE; // generate little endian code | 84 bool isLE; // generate little endian code |
82 bool useDeprecated; // allow use of deprecated features | 85 bool useDeprecated; // allow use of deprecated features |
143 // LDC stuff | 146 // LDC stuff |
144 OUTPUTFLAG output_ll; | 147 OUTPUTFLAG output_ll; |
145 OUTPUTFLAG output_bc; | 148 OUTPUTFLAG output_bc; |
146 OUTPUTFLAG output_s; | 149 OUTPUTFLAG output_s; |
147 OUTPUTFLAG output_o; | 150 OUTPUTFLAG output_o; |
148 bool llvmInline; | |
149 bool llvmAnnotate; | 151 bool llvmAnnotate; |
150 bool useInlineAsm; | 152 bool useInlineAsm; |
151 | 153 |
152 // target stuff | 154 // target stuff |
153 const char* llvmArch; | 155 const char* llvmArch; |