I assume that when -O3 (or O2 or O1) is passed to llvm-gcc, then it utilizes opt. How do I determine what passes opt runs? How do I determine what external tools (and arguments) llvm-gcc is invoking? Regards, Ryan
On Mon, Apr 27, 2009 at 7:02 PM, Ryan M. Lefever <lefever at crhc.illinois.edu> wrote:> I assume that when -O3 (or O2 or O1) is passed to llvm-gcc, then it > utilizes opt.No, llvm-gcc links in the optimization passes and runs them directly. See http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?revision=70258&view=markup . -Eli
On Tuesday 28 April 2009 04:02:47 am Ryan M. Lefever wrote:> I assume that when -O3 (or O2 or O1) is passed to llvm-gcc, then it > utilizes opt. How do I determine what passes opt runs? How do I > determine what external tools (and arguments) llvm-gcc is invoking?It doesn't invoke opt, it runs the passes directly. You can see what passes it is running by passing -fdebug-pass-arguments to llvm-gcc. Ciao, Duncan.
Can I specify passes that I want run directly to llvm-gcc? I don't want all of -O3, for example. I tried llvm-gcc -raiseallocs ..., but that didn't work. I also tried running cc1 directly and it didn't take -raiseallocs as a parameter either. Duncan Sands wrote:> On Tuesday 28 April 2009 04:02:47 am Ryan M. Lefever wrote: >> I assume that when -O3 (or O2 or O1) is passed to llvm-gcc, then it >> utilizes opt. How do I determine what passes opt runs? How do I >> determine what external tools (and arguments) llvm-gcc is invoking? > > It doesn't invoke opt, it runs the passes directly. You can see > what passes it is running by passing -fdebug-pass-arguments to > llvm-gcc. > > Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev