search for: extractvalueinst

Displaying 17 results from an estimated 17 matches for "extractvalueinst".

2009 May 17
1
[LLVMdev] [patch] Remove getType() overrides from extractvalue and insertvalue
Several instruction classes override getType() when the instruction always creates a particular type of value. For example, the result of insertelement is always a vector, so InsertElementInst overrides getType() to return a VectorType*. This makes perfect sense. However, ExtractValueInst and InsertValueInst override getType() to return a PointerType*, which does not make sense and is in fact never correct for the latter instruction; this is probably a relic of an oversight during class creation. So this patch simply removes these overrides, which I suppose is technically...
2008 Jun 09
3
[LLVMdev] Online doxygen out of date?
Hi all, I'm having a bit of trouble with the online doxygen documentation. As far is I know, it should reflect current svn trunk. However, it seems out of date. For example, the ExtractValueInst [1] is not a UnaryInstruction yet and still takes Value* as indices. To add to the confusing, the mainpage [2] says it is documentation version "2.1svn" which seems even more weird. What gives? Matthijs [1]: http://www.llvm.org/doxygen/classllvm_1_1ExtractValueInst.html [2]: http://ww...
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...ype>(Val- >getType())) + if (!isa<StructType>(Val->getType()) && !isa<ArrayType>(Val- >getType()) && + !isa<UnionType>(Val->getType())) return Error(ID.Loc, "extractvalue operand must be array or struct"); if (!ExtractValueInst::getIndexedType(Val->getType(), Indices.begin(), Indices.end())) @@ -2156,7 +2195,8 @@ ParseIndexList(Indices) || ParseToken(lltok::rparen, "expected ')' in insertvalue constantexpr")) return true; -...
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
...Value *GlobalsRet; if ( Call->getType()->isVoidTy() ) { // The original function returned nothing, so the new function returns // only the globals GlobalsRet = New; } else { // Split the values Value *OrigRet = ExtractValueInst::Create(New, 0, "origret", Before); GlobalsRet = ExtractValueInst::Create(New, 1, "globalsret", Before); // Replace all the uses of the original result Call->replaceAllUsesWith(OrigRet); } // Now, store the globals back...
2008 Jun 17
0
[LLVMdev] Transforming ConstantExprs to Instructions
...constant is a ConstantStruct), so be careful not to assume that a constant derivation maps to a single instruction. The case for ConstantExpr is probably the longest, but there aren't actually that many cases: you just have GetElementPtrInst, CastInst, CmpInst, SelectInst, InsertValueInst, and ExtractValueInst (assuming you wouldn't try to prove the legality for anything involving ptrtoint). (Okay, that list ended up a bit longer than I expected, but it still isn't that long.) -Eli
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...gt;getType())) > + if (!isa<StructType>(Val->getType()) && > !isa<ArrayType>(Val->getType()) && > + !isa<UnionType>(Val->getType())) > return Error(ID.Loc, "extractvalue operand must be array or struct"); > if (!ExtractValueInst::getIndexedType(Val->getType(), Indices.begin(), > Indices.end())) > @@ -2156,7 +2195,8 @@ > ParseIndexList(Indices) || > ParseToken(lltok::rparen, "expected ')' in insertvalue > constantexpr")) >...
2011 Sep 16
0
[LLVMdev] How to duplicate a function?
...Value *GlobalsRet; if ( Call->getType()->isVoidTy() ) { // The original function returned nothing, so the new function returns // only the globals GlobalsRet = New; } else { // Split the values Value *OrigRet = ExtractValueInst::Create(New, 0, "origret", Before); GlobalsRet = ExtractValueInst::Create(New, 1, "globalsret", Before); // Replace all the uses of the original result Call->replaceAllUsesWith(OrigRet); } // Now, store the globals back...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...gt;getType())) > + if (!isa<StructType>(Val->getType()) && > !isa<ArrayType>(Val->getType()) && > + !isa<UnionType>(Val->getType())) > return Error(ID.Loc, "extractvalue operand must be array or struct"); > if (!ExtractValueInst::getIndexedType(Val->getType(), Indices.begin(), > Indices.end())) > @@ -2156,7 +2195,8 @@ > ParseIndexList(Indices) || > ParseToken(lltok::rparen, "expected ')' in insertvalue > constantexpr")) >...
2008 Sep 13
3
[LLVMdev] Duplicate Function with duplicated Arguments
I'm now writing a pass and I wanna ask a question about how to duplicate the function and add duplicated arguments in llvm, for example: func(int a, char *b) -> func(int a, char *b, int a1, char *b1) I'm now stuck at using "getOrInsertFunction" and how to handle "getArgumentList", please share your opinion, thanks a lot! James
2008 Jun 17
4
[LLVMdev] Transforming ConstantExprs to Instructions
Hi, I've been struggling with constantexprs for a bit. I'm working on a pass that transforms global variables to local variables, and in particular the GetElementPtrConstantExpr is a bit troublesome. For my transformation to properly work, a global value should only be used by Instructions, not by ConstantExprs. I was thinking to add a ConstantExpr::replaceWithInstr() virtual method,
2008 Jun 09
0
[LLVMdev] Online doxygen out of date?
> I'm having a bit of trouble with the online doxygen documentation. As far is I > know, it should reflect current svn trunk. However, it seems out of date. For > example, the ExtractValueInst [1] is not a UnaryInstruction yet and still > takes Value* as indices. > > To add to the confusing, the mainpage [2] says it is documentation version > "2.1svn" which seems even more weird. > > What gives? Both of these issues are fixed. It will be regenerated tonight....
2012 Jul 31
0
[LLVMdev] rotate
Oh, no. I should have been more clear. The patch was not rejected, just lost in the daily shuffle. I already have my employer's approval to send this upstream, so I will prepare a patch against trunk this morning. > I proposed a similar patch to LLVM (left circular shift) around 10/2011. > > Parts of my patch did make it into trunk about a year after, but others > > did not.
2012 Jul 31
4
[LLVMdev] rotate
On Monday, July 30, 2012 12:16 AM, Cameron McInally wrote: > Hey Andy, > > I proposed a similar patch to LLVM (left circular shift) around 10/2011. > Parts of my patch did make it into trunk about a year after, but others > did not. > > At that time, my solution was to add a binary operator to the IRBuilder, > since LCS fits in nicely with the other shift operators. But,
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:
2012 Jul 31
3
[LLVMdev] rotate
.../ vaarg instruction -HANDLE_OTHER_INST(53, ExtractElement, ExtractElementInst)// extract from vector -HANDLE_OTHER_INST(54, InsertElement, InsertElementInst) // insert into vector -HANDLE_OTHER_INST(55, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. -HANDLE_OTHER_INST(56, ExtractValue, ExtractValueInst)// extract from aggregate -HANDLE_OTHER_INST(57, InsertValue, InsertValueInst) // insert into aggregate -HANDLE_OTHER_INST(58, LandingPad, LandingPadInst) // Landing pad instruction. - LAST_OTHER_INST(58) + FIRST_OTHER_INST(46) +HANDLE_OTHER_INST(46, ICmp , ICmpInst ) // Integer comparison...
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...if (!isa<StructType>(Val->getType()) && >> !isa<ArrayType>(Val->getType()) && >> + !isa<UnionType>(Val->getType())) >> return Error(ID.Loc, "extractvalue operand must be array or >> struct"); >> if (!ExtractValueInst::getIndexedType(Val->getType(), Indices.begin(), >> Indices.end())) >> @@ -2156,7 +2195,8 @@ >> ParseIndexList(Indices) || >> ParseToken(lltok::rparen, "expected ')' in insertvalue >> constantexp...