[LLVMdev] Compilation without optimization

Tanu Sharma tanusharma_04 at yahoo.com
Mon Apr 25 13:14:41 PDT 2005


Thanks for the reply.
 
I wish to compile without optimizations ( the option being turned off ) but still generate bytecode file.
 
Options -S , -c removes optimizations but I also need .bc file to experiment and use further.
 
How should I do it?
 
Thanks
-TS

Chris Lattner <sabre at nondot.org> wrote:
On Sat, 23 Apr 2005, Tanu Sharma wrote:

> I got very useful replies from dev list regarding my earlier question 
> but yet not able to determine block size. That I want in total size of a 
> block in a function in bytes and not just the number of 
> instructions.LLVM Tool gives most of the information e.g function bytes 
> etc....but not individual block.

If you want the size in machine code bytes, you are going to have to 
generate an .s file and count the instructions.

-chris

> Chris Lattner wrote:
> On Fri, 22 Apr 2005, Tanu Sharma wrote:
>
>> Actually I started with hello.cpp povided as an example pass and
>> modified and made my pass which does randomization. I have been working
>> on it and running over programs and it always worked fine but now lately
>> i had checked out a newer version (llvm)which i believed was working
>> fine too but now as i did some modifications and tried to compile my
>> pass i got these errors.
>
> So you get the errors while compiling the pass? Did you recently upgrade
> your system GCC? It looks like it is configured wrong or is somehow
> broken.
>
>> Also I have yet not found a simple way to calculate basic block size in
>> a function.There are tools that give me function size in bytes etc etc
>> ....but not of basic block.I got reply that I have to see what my block
>> does and then calculate size...what does that mean ? iterating over
>> instructions and add the size of the instructions ?how do i determine
>> that ?
>
> Again, what "size" are you looking for? If you just want to figure out
> how many llvm instructions are in it, BB->size() should do the trick.
>
> -Chris
>
>> Chris Lattner wrote:
>> On Thu, 21 Apr 2005, Tanu Sharma wrote:
>>> I am trying to rum my pass (.cpp file) and I am getting the following error.
>>
>> Can you give a little more context about what you're doing?
>>
>> -Chris
>>
>>
>>> ----------------------------------------------------------------------------------------------------------------
>>>
>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crti.o: No such file or directory
>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/crtbeginS.o: No such file or directory
>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/crtendS.o: No such file or directory
>>> g++: /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../crtn.o: No such file or directory
>>> ---------------------------------------------------------------------------------------------------------------
>>>
>>> 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.
>>>
>>> How can I fix it?Is it changing llvm parameters for c++ or requires patch or something fom linux?
>>>
>>> Thanks
>>>
>>> - T
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam? Yahoo! Mail has the best spam protection around
>>> http://mail.yahoo.com
>>
>> -Chris
>>
>>
>
> -Chris
>
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050425/350759d2/attachment.html>


More information about the llvm-dev mailing list