search for: foo_optim

Displaying 2 results from an estimated 2 matches for "foo_optim".

Did you mean: do_optim
2006 Sep 03
0
[LLVMdev] llvm-gcc4: Enable various optimizations at -O1/-O2
Hi All, I have installed llvm-gcc4 patch to enable various llvm optimizations at -O1/-O2/-O3. This means instead of $ llvm-gcc4 --emit-llvm foo.c -o foo.bc $ opt foo.bc -o foo_optimized.bc $ llc foo_optimized.bc -o foo.o One can directly use $ llvm-gcc4 -O2 foo.c -o foo.o to get optimized foo.o - Devang + + if (optimize > 0) { + + + PerModulePasses->add(createRaiseAllocationsPass()); // call % malloc -> malloc inst + PerModulePasses->add(createCFGS...
2008 Jun 11
1
[LLVMdev] question on constant folding
...oo() { double i,j; double sum = 0; for (i=0; i<100; i++) { sum += i; for (j=0; j<100; j++) sum += 2; } return sum; } ------------------------------------------------------------- $llvm-gcc -O4 -emit-llvm foo.c -c -o foo.bc $opt -std-compile-opts -reg2mem foo.bc -o foo_optimized.bc gave me a really long LLVM IR code with many basic blocks.. However, when I just changed the types to 'long' as follows: ------------------------------------------------------------- long foo() { long i,j; long sum = 0; for (i=0; i<100; i++) { sum += i; for (j=...