similar to: [LLVMdev] Union support in LLVM

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Union support in LLVM"

2010 Jan 13
0
[LLVMdev] [PATCH] - Union types, attempt 2
On Jan 12, 2010, at 5:01 PM, Talin wrote: > Here is the LangRef part of the patch. > +<p>The union type is used to represent a set of possible data types which can > + exist at a given location in memory (also known as an "untagged" > + union). [...] This wording is somewhat misleading; memory in LLVM has no types. How about: "A union type describes an
2010 Jan 13
7
[LLVMdev] [PATCH] - Union types, attempt 2
Here is the LangRef part of the patch. On Tue, Jan 12, 2010 at 2:11 PM, Chris Lattner <clattner at apple.com> wrote: > > On Jan 11, 2010, at 4:30 PM, Talin wrote: > > I'm working on a new version of the patch. >> >> Another thing I wanted to ask about - do you prefer to have one giant >> patch that has everything, or a series of incremental patches? I can
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
On Jan 16, 2010, at 11:15 AM, Talin wrote: > OK here's the patch for real this time :) > > On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test > "union.ll" does not work, so you probably don't want to check this > in as is. However, I'd be interested in any
2010 Jan 13
3
[LLVMdev] [PATCH] - Union types, attempt 2
On Tue, Jan 12, 2010 at 5:46 PM, Dan Gohman <gohman at apple.com> wrote: > > On Jan 12, 2010, at 5:01 PM, Talin wrote: > > > Here is the LangRef part of the patch. > > > +<p>The union type is used to represent a set of possible data types > which can > > + exist at a given location in memory (also known as an "untagged" > > +
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
OK here's a new version of the patch - and the unions.ll test actually passes :) On Mon, Jan 18, 2010 at 1:40 PM, Chris Lattner <clattner at apple.com> wrote: > > On Jan 16, 2010, at 11:15 AM, Talin wrote: > > OK here's the patch for real this time :) >> >> On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: >> Here's a work
2009 Jan 02
2
[LLVMdev] Suggestion: Support union types in IR
On Jan 1, 2009, at 6:25 AM, Jon Harrop wrote: >> Exactly. I'm not especially interested in C-style unions, I'm >> interested >> in discriminated unions. But the actual discriminator field is easily >> represented in LLVM IR already, so there's no need to extend the IR >> to >> support them. That's why I am only asking for C-style union
2009 Jan 01
4
[LLVMdev] Suggestion: Support union types in IR
Responding to everyone in one post: Eli Friedman wrote: >> At the moment, the only way I know to achieve this right now is to >> create a struct that is as large as the largest type in the union and then >> bitcast it to access the fields contained within. However, that requires >> that the frontend know the sizes of all of the various low-level types (the >>
2010 Jan 15
2
[LLVMdev] [PATCH] - Union types, attempt 2
On Fri, Jan 15, 2010 at 11:02 AM, Dan Gohman <gohman at apple.com> wrote: > > On Jan 13, 2010, at 12:11 PM, Talin wrote: > > > > It depends on whether or not unions can be passed around as SSA values or > not. I can think of situations where you would want to. > > I'm skeptical that you *really* want to (i.e. that you wouldn't > be better off just
2009 Jan 01
0
[LLVMdev] Suggestion: Support union types in IR
On Thursday 01 January 2009 00:57:50 Talin wrote: > Jon Harrop wrote: > > I think very few people are still using C-style unions so there is > > probably little desire to put them into LLVM itself. Class hierarchies > > and algebraic datatypes are much more common and use a different > > representation (that LLVM can already handle with bitcasts). > > Specifically,
2010 Jan 15
0
[LLVMdev] [PATCH] - Union types, attempt 2
I'm still working on the next patch, it's going somewhat slowly. I wanted to create a unit test that actually created a union, and in order to do that I had to implement constant unions. And rather than creating a special syntax for constructing a union, I decided that it was simplest to implement the insertvalue instruction for a constant union expression: @foo = constant union {
2010 Jan 16
0
[LLVMdev] [patch] Union Types - work in progress
OK here's the patch for real this time :) On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test "union.ll" > does not work, so you probably don't want to check this in as is. However, > I'd be interested in any feedback you're willing to give. > > -- > -- Talin
2010 Jan 15
3
[LLVMdev] [PATCH] - Union types, attempt 2
2010/1/14 Talin <viridia at gmail.com>: > The reason for doing it this way is that to construct a union, you really > need 4 pieces of information: The type of the union, the type and value of > the member to be initialized, and the index of which member is being > initialized. Does requiring the index mean that uniquing the union type will have to re-write many of the
2010 Jan 16
2
[LLVMdev] [patch] Union Types - work in progress
Here's a work in progress of the union patch. Note that the test "union.ll" does not work, so you probably don't want to check this in as is. However, I'd be interested in any feedback you're willing to give. -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Dec 31
0
[LLVMdev] Suggestion: Support union types in IR
On Dec 30, 2008, at 12:41 PM, Talin wrote: > I've been thinking about how to represent unions or "disjoint types" > in LLVM IR. At the moment, the only way I know to achieve this right > now is to create a struct that is as large as the largest type in > the union and then bitcast it to access the fields contained within. > However, that requires that the
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
I've made all the suggested changes - however, I'm having a bit of problem running the tests. I started "make check" and several hours later it had only made it through about 1/3 of the tests. I'm not sure what the deal is. On Mon, Jan 18, 2010 at 1:40 PM, Chris Lattner <clattner at apple.com> wrote: > > On Jan 16, 2010, at 11:15 AM, Talin wrote: > > OK
2009 Jan 04
2
[LLVMdev] Suggestion: Support union types in IR
On Jan 2, 2009, at 2:29 PM, Jon Harrop wrote: >>> I don't think you would want to build discriminated unions on top of >>> C-style unions though. >> >> Why? > > Uniformity when nesting and space efficiency. Users of a language > front-end > will want to nest discriminated unions, e.g. to manipulate trees. Okay, so you're just talking about boxed
2008 Dec 30
7
[LLVMdev] Suggestion: Support union types in IR
I've been thinking about how to represent unions or "disjoint types" in LLVM IR. At the moment, the only way I know to achieve this right now is to create a struct that is as large as the largest type in the union and then bitcast it to access the fields contained within. However, that requires that the frontend know the sizes of all of the various low-level types (the
2013 Mar 30
2
[LLVMdev] Missed optimisation opportunities?
I'm writing a front end for an existing interpreted language with slightly odd semantics for primitive values. Similar to the values in a database table, any value could be null, even for non-pointer types. For example a boolean variable could be true, false, or null. To model this behaviour, I'm passing an {i1, [type]} around for every numeric type. And using insertvalue / extractvalue
2009 Jan 02
0
[LLVMdev] Suggestion: Support union types in IR
On Friday 02 January 2009 20:48:25 Chris Lattner wrote: > On Jan 1, 2009, at 6:25 AM, Jon Harrop wrote: > >> Exactly. I'm not especially interested in C-style unions, I'm > >> interested in discriminated unions. But the actual discriminator field is > >> easily represented in LLVM IR already, so there's no need to extend the > >> IR to support
2010 Jan 15
0
[LLVMdev] [PATCH] - Union types, attempt 2
On Thu, Jan 14, 2010 at 9:25 PM, me22 <me22.ca at gmail.com> wrote: > 2010/1/14 Talin <viridia at gmail.com>: > > The reason for doing it this way is that to construct a union, you really > > need 4 pieces of information: The type of the union, the type and value > of > > the member to be initialized, and the index of which member is being > >