Displaying 20 results from an estimated 24 matches for "constantunion".
2010 Mar 15
3
[LLVMdev] [patch] Writing ConstantUnions
Hello,
I noticed a bit of a gap in the current code for unions: a
ConstantUnion cannot be written out to .ll.
Hopefully I'm not stepping on Talin's toes by posting this, it's a
fairly straightforward adaptation of the code for structs just above.
Tim.
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336...
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...ngRef.html patch looks great. One thing that I notice is that
the term 'aggregate' is not defined anywhere. Please add it to the
#t_classifications section and change the insert/extractvalue
instructions to refer to that type classification instead of
enumerating the options.
The ConstantUnion ctor or ConstantUnion::get should assert that the
constant has type that matches one of the elements of the union.
@@ -928,7 +949,7 @@
/// if the elements of the array are all ConstantInt's.
bool ConstantArray::isString() const {
// Check the element type for i8...
- if (!getType()-...
2010 Mar 15
0
[LLVMdev] [patch] Writing ConstantUnions
On Mon, Mar 15, 2010 at 11:51:47AM +0000, Tim Northover wrote:
> Hello,
>
> I noticed a bit of a gap in the current code for unions: a
> ConstantUnion cannot be written out to .ll.
I've been continuing plugging gaps as I find them, which might not be
the best way to solve this problem, but it has produced something that
seems to do roughly what I expect.
I've split it into three broadly independent patches
1: bitcodeUnion.patch. Again...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...looks great. One thing that I notice is that the
> term 'aggregate' is not defined anywhere. Please add it to the
> #t_classifications section and change the insert/extractvalue instructions
> to refer to that type classification instead of enumerating the options.
>
> The ConstantUnion ctor or ConstantUnion::get should assert that the
> constant has type that matches one of the elements of the union.
>
> @@ -928,7 +949,7 @@
> /// if the elements of the array are all ConstantInt's.
> bool ConstantArray::isString() const {
> // Check the element type for i...
2010 Mar 16
1
[LLVMdev] [patch] Writing ConstantUnions
On Mar 15, 2010, at 2:30 PM, Tim Northover wrote:
> On Mon, Mar 15, 2010 at 11:51:47AM +0000, Tim Northover wrote:
>> Hello,
>>
>> I noticed a bit of a gap in the current code for unions: a
>> ConstantUnion cannot be written out to .ll.
>
> I've been continuing plugging gaps as I find them, which might not be
> the best way to solve this problem, but it has produced something that
> seems to do roughly what I expect.
>
> I've split it into three broadly independent patches...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...looks great. One thing that I notice is that the
> term 'aggregate' is not defined anywhere. Please add it to the
> #t_classifications section and change the insert/extractvalue instructions
> to refer to that type classification instead of enumerating the options.
>
> The ConstantUnion ctor or ConstantUnion::get should assert that the
> constant has type that matches one of the elements of the union.
>
> @@ -928,7 +949,7 @@
> /// if the elements of the array are all ConstantInt's.
> bool ConstantArray::isString() const {
> // Check the element type for i...
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 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:
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...hing that I notice is that the
>> term 'aggregate' is not defined anywhere. Please add it to the
>> #t_classifications section and change the insert/extractvalue instructions
>> to refer to that type classification instead of enumerating the options.
>>
>> The ConstantUnion ctor or ConstantUnion::get should assert that the
>> constant has type that matches one of the elements of the union.
>>
>> @@ -928,7 +949,7 @@
>> /// if the elements of the array are all ConstantInt's.
>> bool ConstantArray::isString() const {
>> // Chec...
2010 Feb 16
2
[LLVMdev] [PATCH] - Union types, replaceUsesOfWithOnConstant
Here's the implementation of ConstantUnion::replaceUsesOfWithOnConstant().
No tests yet :(
Two questions:
-- Any suggestions as to an existing test I could use as a model for testing
this?
-- I could also use some advice on what part of the code to work on next (in
terms of finishing up union support).
--
-- Talin
-------------- next pa...
2010 Aug 15
7
[LLVMdev] "UNREACHABLE executed!" error?
...d!
Stack dump:
0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@0'
I just noticed that my union seems to look like an array....is that actually
a union or do I have a problem somewhere? The code I use to generate the
union is:
llvm::Constant* tempUnion =
llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t]));
llvm::Value* goodUnion =
builder.CreateInsertValue(tempUnion,data,t,"createuniontmp");
object_union_type is union { double, i1 }, and (in this case) t is 0, and
types[t] is double
On Sun, Aug 15, 2010 at 4:13 PM, Eric Ch...
2010 Jan 11
0
[LLVMdev] [PATCH] - Union types, attempt 2
...at a union of { i32, i32 } doesn't make sense, but should the code actually forbid this?
Either way works for me.
> As far as constants go, as long as the initializer is an exact match for one of the member types, it should be no problem.
Right, please propose a syntax and a class to use (ConstantUnion?) for it,
-Chris
2010 Feb 17
0
[LLVMdev] [PATCH] - Union types, replaceUsesOfWithOnConstant
On Feb 16, 2010, at 12:38 PM, Talin wrote:
> Here's the implementation of ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet :(
Seems basically ok, please commit.
>
> Two questions:
>
> -- Any suggestions as to an existing test I could use as a model for testing this?
IS this what is causing this to be broken?
$ cat t.ll
@union1 = constant union { i32*, i8 }...
2010 Feb 10
0
[LLVMdev] [patch] Union Types - work in progress
...the term "implicitly converted".
Constants.cpp:
- assert(Idx->getType()->isInteger(32) &&
+ assert(Idx->getType() == Type::getInt32Ty(Val->getContext()) &&
You're reverting these changes, please don't. There are a couple instances of this.
+void ConstantUnion::replaceUsesOfWithOnConstant(Value *From, Value *To,
+ Use *U) {
+ assert(false && "Implement replaceUsesOfWithOnConstant for unions");
+}
+
Still not implemented?
+UnionType *UnionType::get(const Type *type, ...) {
+ va_list ap;...
2010 Feb 17
1
[LLVMdev] [PATCH] - Union types, replaceUsesOfWithOnConstant
On Wed, Feb 17, 2010 at 12:05 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Feb 16, 2010, at 12:38 PM, Talin wrote:
>
> > Here's the implementation of
> ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet :(
>
> Seems basically ok, please commit.
>
> I suppose that means that I'll have to send in the info to get commit
access then :(
>
> > Two questions:
> >
> > -- Any suggestions as to an existing test I could use a...
2010 Aug 15
0
[LLVMdev] "UNREACHABLE executed!" error?
...39;X86 DAG->DAG Instruction Selection' on function '@0'
>
> I just noticed that my union seems to look like an array....is that
> actually a union or do I have a problem somewhere? The code I use to
> generate the union is:
>
> llvm::Constant* tempUnion =
> llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t]));
>
> llvm::Value* goodUnion =
> builder.CreateInsertValue(tempUnion,data,t,"createuniontmp");
>
> object_union_type is union { double, i1 }, and (in this case) t is 0,
> and types[t] is double
>
>
>...
2010 Feb 12
1
[LLVMdev] [patch] Union Types - work in progress
...sert(Idx->getType() == Type::getInt32Ty(Val->getContext()) &&
>
> You're reverting these changes, please don't. There are a couple instances
> of this.
>
Didn't mean to :) Hope that the train hasn't moved too far while I was
editing this.
>
> +void ConstantUnion::replaceUsesOfWithOnConstant(Value *From, Value *To,
> + Use *U) {
> + assert(false && "Implement replaceUsesOfWithOnConstant for unions");
> +}
> +
>
> Still not implemented?
>
> Not in this patch - as you s...
2010 Aug 15
1
[LLVMdev] "UNREACHABLE executed!" error?
...ion' on function '@0'
>>
>> I just noticed that my union seems to look like an array....is that
>> actually a union or do I have a problem somewhere? The code I use to
>> generate the union is:
>>
>> llvm::Constant* tempUnion =
>>
>> llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t]));
>>
>> llvm::Value* goodUnion =
>> builder.CreateInsertValue(tempUnion,data,t,"createuniontmp");
>>
>> object_union_type is union { double, i1 }, and (in this case) t is 0,
>> and types[t] i...
2010 Jan 11
2
[LLVMdev] [PATCH] - Union types, attempt 2
Quick question - should unions enforce that all member types are unique? I
realize that a union of { i32, i32 } doesn't make sense, but should the code
actually forbid this?
As far as constants go, as long as the initializer is an exact match for one
of the member types, it should be no problem.
On Fri, Jan 8, 2010 at 11:00 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On
2010 Aug 15
2
[LLVMdev] "UNREACHABLE executed!" error?
What does this error mean? I'm getting it from an
ExecutionEngine::runFunction() call. The function I'm passing it was run
through verifyFunction() right before the runFunction() call. I can't seem
to find anything that tells me what causes this, only specific
(but seemingly unrelated to my problem) cases of it happening.
-------------- next part --------------
An HTML attachment was