similar to: [LLVMdev] Clarification between <type> and <ty> for alloca instruction

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Clarification between <type> and <ty> for alloca instruction"

2013 Aug 15
0
[LLVMdev] Clarification between <type> and <ty> for alloca instruction
> I've obviously being playing with C++ too long because my > instinct immediately told me that dynamically sized arrays on the > stack are't allowed but apparently that's fine for C99 (g++ also seems > fine with this is you don't specify -pedantic) It's all fun and games until someone decides to evaluate sizeof(arr). ;-) I think a more limited form is coming to
2013 Aug 15
1
[LLVMdev] Clarification between <type> and <ty> for alloca instruction
Hi, This is quite a simple question so hopefully it's easy to answer. I was looking at the documentation for the alloca instruction ( http://llvm.org/docs/LangRef.html#alloca-instruction ) and something is unclear to me. The given syntax is... <result> = alloca <type>[, <ty> <NumElements>][, align <alignment>] ; yields {type*}:result And the documentation
2013 Aug 15
1
[LLVMdev] Clarification between <type> and <ty> for alloca instruction
On 15/08/13 16:12, Tim Northover wrote: >> I've obviously being playing with C++ too long because my >> instinct immediately told me that dynamically sized arrays on >> the stack are't allowed but apparently that's fine for C99 (g++ >> also seems fine with this is you don't specify -pedantic) > > It's all fun and games until someone decides to
2007 Oct 06
2
[LLVMdev] malloc(), free(), and alloca() with zero size
If <NumElements> is zero, what is the behavior of malloc() and alloca()? Can I call free() using the pointer that malloc() returns? Also, I'm assuming that free()ing a null pointer is a legal NOP? Regards, Jon
2008 Oct 07
2
[LLVMdev] Question concerning alloca
In alloca, is it required that NumElements be a literal integer, or can it be a computed result? The real question is whether the current IR can support a one-stack implementation of Ada's dynamically sized stack frames. shap
2008 Apr 19
3
[LLVMdev] Reference Manual Clarifications 2
Chris Lattner wrote: > On Apr 19, 2008, at 3:27 PM, Jon Sargeant wrote: >>>> Regarding malloc and alloca, I realized that the size is unsigned, >>>> so a >>>> negative value for NumElements is impossible. I suggest replacing >>>> "it >>>> is the number of elements allocated" with "it is the UNSIGNED number
2008 Apr 19
0
[LLVMdev] Reference Manual Clarifications 2
On Apr 19, 2008, at 3:27 PM, Jon Sargeant wrote: >>> Regarding malloc and alloca, I realized that the size is unsigned, >>> so a >>> negative value for NumElements is impossible. I suggest replacing >>> "it >>> is the number of elements allocated" with "it is the UNSIGNED number >>> of >>> elements allocated".
2008 Apr 19
2
[LLVMdev] Reference Manual Clarifications 2
Thanks for your reply. Chris Lattner wrote: >> Regarding free, I also think your wording isn't clear enough: "If the >> pointer is null, the result is undefined." The free result is void. >> Consider rewording as "If the pointer is null, the operation is valid >> but does not free the pointer." > > It isn't though. free(NULL) could
2007 Oct 06
0
[LLVMdev] malloc(), free(), and alloca() with zero size
On Oct 6, 2007, at 9:14 AM, Jon Sargeant wrote: > If <NumElements> is zero, what is the behavior of malloc() and > alloca()? > Can I call free() using the pointer that malloc() returns? alloca is not standard. The behavior of malloc is covered in 7.20.3p1: If the size of the space requested is zero, the behavior is implementation-defined: either a null pointer is returned, or
2007 Oct 07
1
[LLVMdev] malloc(), free(), and alloca() with zero size
Dale Johannesen wrote: > On Oct 6, 2007, at 9:14 AM, Jon Sargeant wrote: > >> If <NumElements> is zero, what is the behavior of malloc() and >> alloca()? >> Can I call free() using the pointer that malloc() returns? > > alloca is not standard. > The behavior of malloc is covered in 7.20.3p1: > > If the size of the space requested is zero, the
2008 Apr 19
0
[LLVMdev] Reference Manual Clarifications 2
On Apr 1, 2008, at 6:41 PM, Jon Sargeant wrote: > Chris Lattner wrote: >> On Mon, 31 Mar 2008, Jon Sargeant wrote: >>> I'm attaching another round of changes. Please verify that they >>> are correct. >> >> Applied with edits: >> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080331/060556.html >> > Hmm, I realized that the
2012 Apr 12
0
[LLVMdev] detection of constant diagonal matrix * vector
Hi! currently instcombine does not detect constant diagonal matrix times vector, for example a.xx * [2 0] + a.yy * [0 3] can be optimized to a * [2 3] I have implemented this for float. I know that this assumes x * 0 = 0 which is not ieee compliant but i post it here in case it is interesting for someone. on my wish list there is still an option for target independent optimizations to have x
2008 Apr 05
0
[LLVMdev] Reference Manual Clarifications 2
Jon Sargeant wrote: > Chris Lattner wrote: >> On Mon, 31 Mar 2008, Jon Sargeant wrote: >>> I'm attaching another round of changes. Please verify that they are correct. >> Applied with edits: >> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080331/060556.html >> >> I figured out what your patches don't apply. Something (your web
2008 Feb 07
1
[LLVMdev] Imprecise description of malloc instruction
Hi all, Quoting <http://llvm.org/docs/LangRef.html#i_malloc>: The 'malloc' instruction allocates sizeof(<type>)*NumElements bytes of memory from the operating system and returns a pointer of the appropriate type to the program. If "NumElements" is specified, it is the number of elements allocated. Obviously this does not say that the default for NumElements
2008 Apr 02
5
[LLVMdev] Reference Manual Clarifications 2
Chris Lattner wrote: > On Mon, 31 Mar 2008, Jon Sargeant wrote: >> I'm attaching another round of changes. Please verify that they are correct. > > Applied with edits: > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080331/060556.html > > I figured out what your patches don't apply. Something (your web browser, > editor, etc) is stripping
2008 Apr 21
0
[LLVMdev] Reference Manual Clarifications 2
Am Sonntag, den 20.04.2008, 09:34 -0700 schrieb Jon Sargeant: > Joachim Durchholz wrote: > > Am Samstag, den 19.04.2008, 16:24 -0700 schrieb Jon Sargeant: > >> First, I can assign -1 to > >> the count to indicate an invalid or unknown value. > > > > This is a C-ism. In a language that supports discriminated unions well, > > you'd do something like
2009 Jul 13
0
[LLVMdev] Clang source question around failing MSVC build
ParseDecl.cpp fails to compile with MSVC reporting the following error: ParseDecl.cpp compiler\llvm\tools\clang\lib\Parse\ParseDecl.cpp(2760) : error C2248: 'clang::A STOwningResult<Destroyer>::operator =' : cannot access private member declared i n class 'clang::ASTOwningResult<Destroyer>' with [ Destroyer=::upâ–˛ ]
2008 Apr 20
3
[LLVMdev] Reference Manual Clarifications 2
Joachim Durchholz wrote: > Am Samstag, den 19.04.2008, 16:24 -0700 schrieb Jon Sargeant: >> First, I can assign -1 to >> the count to indicate an invalid or unknown value. > > This is a C-ism. In a language that supports discriminated unions well, > you'd do something like > type AllocaCount = Invalid | Unknown | Known int > (where Invalid, Unknown and Known
2008 Apr 20
0
[LLVMdev] Reference Manual Clarifications 2
Am Samstag, den 19.04.2008, 16:24 -0700 schrieb Jon Sargeant: > First, I can assign -1 to > the count to indicate an invalid or unknown value. This is a C-ism. In a language that supports discriminated unions well, you'd do something like type AllocaCount = Invalid | Unknown | Known int (where Invalid, Unknown and Known are the constants that do the distinction between union
2015 Aug 27
3
RFC: alloca -- specify address space for allocation
Philip: I think there are two separate issues: 1) Handling GC pointers stored in stack locations -- tracking their liveness, reporting them to the GC. etc. 2) Treating pointers to stack locations as GC-pointers. I think the two options that you presented here are for solving (1). I'm trying to solve issue (2) using alloca in addrspace(1). Basically, we want to create a pointer to a stack