search for: constantval

Displaying 10 results from an estimated 10 matches for "constantval".

2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...!isa<StructType>(Val0->getType()) && !isa<ArrayType>(Val0- >getType()) && + !isa<UnionType>(Val0->getType())) How about changing this to use Type::isAggregateType() instead of enumerating? This happens a few times in LLParser.cpp + if (ID.ConstantVal->getType() != Ty) { + // Allow a constant struct with a single member to be converted + // to a union, if the union has a member which is the same type + // as the struct member. + if (const UnionType* utype = dyn_cast<UnionType>(Ty)) { + if (const StructType* st...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...getType()) && > !isa<ArrayType>(Val0->getType()) && > + !isa<UnionType>(Val0->getType())) > > How about changing this to use Type::isAggregateType() instead of > enumerating? This happens a few times in LLParser.cpp > > > + if (ID.ConstantVal->getType() != Ty) { > + // Allow a constant struct with a single member to be converted > + // to a union, if the union has a member which is the same type > + // as the struct member. > + if (const UnionType* utype = dyn_cast<UnionType>(Ty)) { > +...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...getType()) && > !isa<ArrayType>(Val0->getType()) && > + !isa<UnionType>(Val0->getType())) > > How about changing this to use Type::isAggregateType() instead of > enumerating? This happens a few times in LLParser.cpp > > > + if (ID.ConstantVal->getType() != Ty) { > + // Allow a constant struct with a single member to be converted > + // to a union, if the union has a member which is the same type > + // as the struct member. > + if (const UnionType* utype = dyn_cast<UnionType>(Ty)) { > +...
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:
2009 Oct 08
2
[LLVMdev] Some additions to the C bindings
...for exposing these more complex manipulations? +/* Operations on Users */ +LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index); So how are you using this, since you aren't exposing any of the other operand functionality? +unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal); +long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal); I'm not sure about these functions. There really isn't any other way to get to the value of any other constant, so why do you need this? /* Operations on composite constants */ @@ -464,6 +479,7 @@ LLVMValueRef LLVMConstV...
2009 Oct 07
0
[LLVMdev] Some additions to the C bindings
On Tue, Oct 6, 2009 at 2:13 PM, Kenneth Uildriks <kennethuil at gmail.com> wrote: > My front-end is sync'd with the trunk now, and working well, but it > required some additional functions exposed in the C bindings.  I > hereby submit them for review and approval for inclusion in the trunk. > LLVMGetAttribute had a bug in it. Here's the revised version of the patch
2009 Oct 06
3
[LLVMdev] Some additions to the C bindings
My front-end is sync'd with the trunk now, and working well, but it required some additional functions exposed in the C bindings. I hereby submit them for review and approval for inclusion in the trunk. -------------- next part -------------- A non-text attachment was scrubbed... Name: cbindings.patch Type: application/octet-stream Size: 7269 bytes Desc: not available URL:
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...isa<ArrayType>(Val0->getType()) && >> + !isa<UnionType>(Val0->getType())) >> >> How about changing this to use Type::isAggregateType() instead of >> enumerating? This happens a few times in LLParser.cpp >> >> >> + if (ID.ConstantVal->getType() != Ty) { >> + // Allow a constant struct with a single member to be converted >> + // to a union, if the union has a member which is the same type >> + // as the struct member. >> + if (const UnionType* utype = dyn_cast<UnionType>(Ty))...
2009 Oct 08
0
[LLVMdev] Some additions to the C bindings
...that is a LoadInst can have its address taken. I need the pointer operand of the LoadInst to get the address Value. I figured GetOperand was a good starting point, and could support most of the operand use cases out there. > > > +unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal); > +long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal); > > > I'm not sure about these functions. There really isn't any other way > to get to the value of any other constant, so why do you need this? When I've parsed an int literal and put it on my evaluation...