<div>Hi all,<br>  I am a newbie to LLVM and tried experimenting compile a small C program with it. </div>
<div>This is what I did:<br> </div>
<div>1. Wrote a simple C program with some dead code.<br>2. compiled it with llvm-gcc. [$ llvm-gcc -emit-llvm -S deadc.c]<br>3. Fetched it to assembler. [$ llvm-as deadc.s]<br>4. [$ opt -analyze -ade deadc.s.bc]  [Ran without -analyze switch also: $opt -o final_opt -verify-each -globaldce -f deadc.s]<br>
  Here I always get the message "Printing analysis 'Dead Global Elimination':<br>                                                      Pass::print not implemented for pass: 'Dead Global Elimination'!"</div>

<p>5. Now after step 4, I get a final binary and I disassemble it to see the effect of optimization and lo ! Actually there was no sign of optimization and each piece of code was intact?<br>[llvm-dis final_opt]</p>
<p>Am I missing something here? Please let me know.</p>
<p>Thanks,<br>Vishal</p>
<p><br>PS: Here is the version information<br>$ llvm-gcc -v<br>Using built-in specs.<br>Target: i686-pc-linux-gnu<br>Configured with: ../llvm-gcc4.2-2.3.source/configure --prefix=/mounts/zion/disks/0/localhome/tbrethou/2.3/test/llvm-gcc/install --program-prefix=llvm- --enable-llvm=/mounts/zion/disks/0/localhome/tbrethou/2.3/test/llvm-2.3/ --enable-languages=c,c++ --disable-shared --disable-bootstrap<br>
Thread model: posix<br>gcc version 4.2.1 (Based on Apple Inc. build 5555) (LLVM build 2.3)</p>
<p>$ /usr/local/bin/opt -version<br>Low Level Virtual Machine (<a href="http://llvm.org/">http://llvm.org/</a>):<br>  llvm version 2.3<br>  Optimized build with assertions.</p>