Displaying 18 results from an estimated 18 matches for "classllvm_1_1targetdata".
2010 May 08
2
[LLVMdev] does llvm have some way to get the size of data type
...read, since Erick and John could have seen that I was linking
to their suggestions.
On Fri, May 7, 2010 at 8:47 PM, Jeffrey Yasskin <jyasskin at google.com> wrote:
> Try http://llvm.org/doxygen/classllvm_1_1ConstantExpr.html#a2ea738dfa37ea93c71756be89ba8d92
> or http://llvm.org/doxygen/classllvm_1_1TargetData.html#64c154a7844026e76e18f792ee4ad4b3
>
> On Fri, May 7, 2010 at 8:26 PM, Gang.Yao <ttoole9 at gmail.com> wrote:
>> Hi:
>>
>> just like the c function sizeof(). I would avoid the usage of the c
>> function call, and expect something like llvm
>> intrinsic o...
2005 Jun 20
4
[LLVMdev] variable sized structs in LLVM
Hi Reid,
Reid Spencer wrote:
> Yes, for that you need TargetData:
>
> http://illuvium.net/docs/doxygen/classllvm_1_1TargetData.html
I feared that that would be the answer :-). We're not using the LLVM-API
at the moment. We're just generating a .ll file 'by hand', e.g. via
simple string operations. I guess we get what we deserve :-).
Thanks for your help,
Carl Friedrich
2010 May 08
0
[LLVMdev] does llvm have some way to get the size of data type
Try http://llvm.org/doxygen/classllvm_1_1ConstantExpr.html#a2ea738dfa37ea93c71756be89ba8d92
or http://llvm.org/doxygen/classllvm_1_1TargetData.html#64c154a7844026e76e18f792ee4ad4b3
On Fri, May 7, 2010 at 8:26 PM, Gang.Yao <ttoole9 at gmail.com> wrote:
> Hi:
>
> just like the c function sizeof(). I would avoid the usage of the c
> function call, and expect something like llvm
> intrinsic or some class providing this f...
2010 May 08
0
[LLVMdev] does llvm have some way to get the size of data type
...ohn could have seen that I was linking
> to their suggestions.
>
> On Fri, May 7, 2010 at 8:47 PM, Jeffrey Yasskin <jyasskin at google.com> wrote:
>> Try http://llvm.org/doxygen/classllvm_1_1ConstantExpr.html#a2ea738dfa37ea93c71756be89ba8d92
>> or http://llvm.org/doxygen/classllvm_1_1TargetData.html#64c154a7844026e76e18f792ee4ad4b3
>>
>> On Fri, May 7, 2010 at 8:26 PM, Gang.Yao <ttoole9 at gmail.com> wrote:
>>> Hi:
>>>
>>> just like the c function sizeof(). I would avoid the usage of the c
>>> function call, and expect something like...
2005 Jun 20
2
[LLVMdev] variable sized structs in LLVM
Hi Reid,
On Mon, Jun 20, 2005 at 07:08 -0700, Reid Spencer wrote:
> The thing you're missing is that LLVM's primitive types have well known,
> fixed sizes that are not target dependent. A ulong is 8 bytes. A uint is
> 4 bytes. A ushort is 2 bytes. Etc. and always.
Don't aligning rules make it hard to compute the size of a
whole struct from the sizes of it's members?
2005 Jun 20
0
[LLVMdev] variable sized structs in LLVM
Yes, for that you need TargetData:
http://illuvium.net/docs/doxygen/classllvm_1_1TargetData.html
Reid.
On Mon, 2005-06-20 at 17:08 +0200, holger krekel wrote:
> Hi Reid,
>
> On Mon, Jun 20, 2005 at 07:08 -0700, Reid Spencer wrote:
> > The thing you're missing is that LLVM's primitive types have well known,
> > fixed sizes that are not target dependent. A u...
2009 Jun 18
2
[LLVMdev] Explicitly Freeing Allocas
...clare the TargetData pass as a prerequisite and to get a pointer
> to it when your
> runOnFunction/runOnModule/runOnBasicBlock/runOn<whatever> method is
> called. Then use the doxygen documentation to find the correct method
> of the TargetData pass
> (http://llvm.org/doxygen/classllvm_1_1TargetData.html) to use to get the
> size of the type that you allocated via alloca.
>
> -- John T.
>
>> Thank you for your help,
>>
>> - Max
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu...
2010 May 08
5
[LLVMdev] does llvm have some way to get the size of data type
Hi:
just like the c function sizeof(). I would avoid the usage of the c
function call, and expect something like llvm
intrinsic or some class providing this functionality.
Does someone have experience in this?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100507/056bae50/attachment.html>
2009 Jun 18
0
[LLVMdev] Explicitly Freeing Allocas
...how to have your
pass declare the TargetData pass as a prerequisite and to get a pointer
to it when your
runOnFunction/runOnModule/runOnBasicBlock/runOn<whatever> method is
called. Then use the doxygen documentation to find the correct method
of the TargetData pass
(http://llvm.org/doxygen/classllvm_1_1TargetData.html) to use to get the
size of the type that you allocated via alloca.
-- John T.
> Thank you for your help,
>
> - Max
>
2010 May 28
0
[LLVMdev] how to get TargetData?
...r handling
// TD is what you want.
TD = TM->getTargetData();
[...]
// Free TM
delete TM;
==== END CODE SNIPPET ====
For your case, you should be able to find TripleStr and FeatureStr in
somewhere.
And also there's a constructor in TargetData (
http://llvm.org/doxygen/classllvm_1_1TargetData.html#a0d7acb06af9665b54fc74480e2c6c707)
takeing a string "TargetDescription". The string specifies the data layout
of a target and its format is described here
http://llvm.org/docs/LangRef.html#datalayout. Thus, if you are developing a
customized target and/or you are really know the data...
2011 Jan 28
0
[LLVMdev] The type or size of virtual registers
...egister was wrong. Need your further help.
I don't work much with LLVM's code generator infrastructure (I primarily
do LLVM IR analysis and transforms), so I don't think I can answer your
question.
When working with pure LLVM IR, we use the TargetData class
(http://llvm.org/doxygen/classllvm_1_1TargetData.html) to determine the
size of various LLVM types. I'm not sure if it's what you want to use
in the code generator. Someone else will have to help you with that.
-- John T.
>
> 2011/1/28 John Criswell <criswell at illinois.edu
> <mailto:criswell at illinois.edu>>...
2009 Jun 18
0
[LLVMdev] Explicitly Freeing Allocas
...s as a prerequisite and to get a pointer
> > to it when your
> > runOnFunction/runOnModule/runOnBasicBlock/runOn<whatever> method is
> > called. Then use the doxygen documentation to find the correct method
> > of the TargetData pass
> > (http://llvm.org/doxygen/classllvm_1_1TargetData.html) to use to get the
> > size of the type that you allocated via alloca.
> >
> > -- John T.
> >
> >> Thank you for your help,
> >>
> >> - Max
> >>
> >
> > _______________________________________________
> > LLVM Develo...
2010 May 28
4
[LLVMdev] how to get TargetData?
Dear all
I am trying to get the size of an LLVM pointer type.
getPrimitiveSizeInBits() returns 0 for it and the documentation for
isSized() suggest to use TargetData.
I figured out from Kaleidoscope example that one can get a pointer to
TagetData object through the execution engine but it seems to be an
overkill.
What is the right way to do it?
Best regards,
Victor
-------------- next part
2011 Jan 29
1
[LLVMdev] The type or size of virtual registers
...help.
>
>
> I don't work much with LLVM's code generator infrastructure (I primarily do
> LLVM IR analysis and transforms), so I don't think I can answer your
> question.
>
> When working with pure LLVM IR, we use the TargetData class (
> http://llvm.org/doxygen/classllvm_1_1TargetData.html) to determine the
> size of various LLVM types. I'm not sure if it's what you want to use in
> the code generator. Someone else will have to help you with that.
>
> -- John T.
>
>
>
> 2011/1/28 John Criswell <criswell at illinois.edu>
>
>> On 1/...
2009 Jun 18
5
[LLVMdev] Explicitly Freeing Allocas
Hello,
I would just like to ask if it's possible to explicitly free allocas. This
is because I need to call functions that take structs of different sizes as
input, (possibly inside of loops) and I would rather avoid a stack overflow.
If this is not possible, an alternate solution would be for me to allocate
an array of bytes larger than all the struct types I may be using, and cast
that
2011 Jan 28
2
[LLVMdev] The type or size of virtual registers
Thanks for your help with me about the way to access type and size of Value.
But, I want also know the interface for me to access the type or size of
virtual registers in the SSA form.
1. I find no way to associate the virtual registers with the Value class.
2. I also tried to get the size of register nReg by:
TargetRegisterClass::getSize(), where the TargetRegisterClass object is
obtained by
2005 Jun 20
0
[LLVMdev] variable sized structs in LLVM
...al size needed.
This is a bit more code generation but should be fairly efficient.
Reid.
On Tue, 2005-06-21 at 00:40 +0200, Carl Friedrich Bolz wrote:
> Hi Reid,
>
> Reid Spencer wrote:
> > Yes, for that you need TargetData:
> >
> > http://illuvium.net/docs/doxygen/classllvm_1_1TargetData.html
>
> I feared that that would be the answer :-). We're not using the LLVM-API
> at the moment. We're just generating a .ll file 'by hand', e.g. via
> simple string operations. I guess we get what we deserve :-).
>
> Thanks for your help,
>
> Carl Fri...
2009 Jun 18
1
[LLVMdev] Explicitly Freeing Allocas
...and to get a pointer
>> > to it when your
>> > runOnFunction/runOnModule/runOnBasicBlock/runOn<whatever> method is
>> > called. Then use the doxygen documentation to find the correct method
>> > of the TargetData pass
>> > (http://llvm.org/doxygen/classllvm_1_1TargetData.html) to use to get
>> the
>> > size of the type that you allocated via alloca.
>> >
>> > -- John T.
>> >
>> >> Thank you for your help,
>> >>
>> >> - Max
>> >>
>> >
>> > ____________________...