<DIV>Thanks !!</DIV>
<DIV> </DIV>
<DIV>But if i generate a .bc file like this and then run my pass over it like this :</DIV>
<DIV><BR>opt -load /home/llvm-cvs/llvm/Debug/lib/LLVMHello.so -hello <helloprog.bc> class_prog.bc</DIV>
<DIV> </DIV>
<DIV>Will the new .bc file (class_prog.bc) be also without optimizations ?opt also does some optimizations.Can I control them ?</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV>Tanu<BR><BR><B><I>Chris Lattner <sabre@nondot.org></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On Mon, 25 Apr 2005, Tanu Sharma wrote:<BR><BR>> Thanks for the reply.<BR>><BR>> I wish to compile without optimizations ( the option being turned off ) <BR>> but still generate bytecode file.<BR>><BR>> Options -S , -c removes optimizations but I also need .bc file to <BR>> experiment and use further.<BR><BR>Passing "-Wa,-disable-opt -Wl,-disable-opt" will disable *all* cleanup and <BR>optimizations done at the llvm level, leaving you with the truly horrible <BR>code that you desire :).<BR><BR>-Chris<BR><BR>> Chris Lattner <SABRE@NONDOT.ORG>wrote:<BR>> On Sat, 23 Apr 2005, Tanu Sharma wrote:<BR>><BR>>> I got very useful replies from dev list regarding my earlier question<BR>>> but yet not able to determine block size. That I want in total size of a<BR>>> block in a function in bytes and not just the number of<BR>>>
 instructions.LLVM Tool gives most of the information e.g function bytes<BR>>> etc....but not individual block.<BR>><BR>> If you want the size in machine code bytes, you are going to have to<BR>> generate an .s file and count the instructions.<BR>><BR>> -chris<BR>><BR>>> Chris Lattner wrote:<BR>>> On Fri, 22 Apr 2005, Tanu Sharma wrote:<BR>>><BR>>>> Actually I started with hello.cpp povided as an example pass and<BR>>>> modified and made my pass which does randomization. I have been working<BR>>>> on it and running over programs and it always worked fine but now lately<BR>>>> i had checked out a newer version (llvm)which i believed was working<BR>>>> fine too but now as i did some modifications and tried to compile my<BR>>>> pass i got these errors.<BR>>><BR>>> So you get the errors while compiling the pass? Did you recently upgrade<BR>>> your system GCC? It look!
 s like it
 is configured wrong or is somehow<BR>>> broken.<BR>>><BR>>>> Also I have yet not found a simple way to calculate basic block size in<BR>>>> a function.There are tools that give me function size in bytes etc etc<BR>>>> ....but not of basic block.I got reply that I have to see what my block<BR>>>> does and then calculate size...what does that mean ? iterating over<BR>>>> instructions and add the size of the instructions ?how do i determine<BR>>>> that ?<BR>>><BR>>> Again, what "size" are you looking for? If you just want to figure out<BR>>> how many llvm instructions are in it, BB->size() should do the trick.<BR>>><BR>>> -Chris<BR>>><BR>>>> Chris Lattner wrote:<BR>>>> On Thu, 21 Apr 2005, Tanu Sharma wrote:<BR>>>>> I am trying to rum my pass (.cpp file) and I am getting the following error.<BR>>>><BR>>>> Can you give a little!
  more
 context about what you're doing?<BR>>>><BR>>>> -Chris<BR>>>><BR>>>><BR>>>>> ----------------------------------------------------------------------------------------------------------------<BR>>>>><BR>>>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crti.o: No such file or directory<BR>>>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/crtbeginS.o: No such file or directory<BR>>>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/crtendS.o: No such file or directory<BR>>>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crtn.o: No such file or directory<BR>>>>> ---------------------------------------------------------------------------------------------------------------<BR>>>>><BR>>>>> It seems the error just appreared from nowhere.Earlier it was working fine.I had also checked out the latest version from cvs sometime back but feel !
 I worked
 on that for sometime before this appeared.<BR>>>>><BR>>>>> How can I fix it?Is it changing llvm parameters for c++ or requires patch or something fom linux?<BR>>>>><BR>>>>> Thanks<BR>>>>><BR>>>>> - T<BR>>>>><BR>>>>> __________________________________________________<BR>>>>> Do You Yahoo!?<BR>>>>> Tired of spam? Yahoo! Mail has the best spam protection around<BR>>>>> http://mail.yahoo.com<BR>>>><BR>>>> -Chris<BR>>>><BR>>>><BR>>><BR>>> -Chris<BR>>><BR>>><BR>><BR>> -Chris<BR>><BR>><BR><BR>-Chris<BR><BR>-- <BR>http://nondot.org/sabre/<BR>http://llvm.cs.uiuc.edu/<BR><BR>_______________________________________________<BR>LLVM Developers mailing list<BR>LLVMdev@cs.uiuc.edu
 http://llvm.cs.uiuc.edu<BR>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev<BR></BLOCKQUOTE><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com