search for: insertvalueinsts

Displaying 15 results from an estimated 15 matches for "insertvalueinsts".

Did you mean: insertvalueinst
2008 Jul 03
0
[LLVMdev] Plans considering first class structs and multiple return values
> For example, this: > > %t0 = insertvalue { i32, i32 } undef, i32 %a, 0 > %t1 = insertvalue { i32, i32 } %t0, i32 %b, 1 > > creates the value with %a and %b as member values. Is there anyway to do it using the C++ API? It seems I need an instance of the aggregate type to pass into InsertValueInst::Create(). What is the API equivalent of "undef"? Marc On Wed,
2008 Jul 02
3
[LLVMdev] Plans considering first class structs and multiple return values
Hello, The basic infrastructure is in place. You can create first-class structs/arrays using sequences of insertvalue. For example, this: %t0 = insertvalue { i32, i32 } undef, i32 %a, 0 %t1 = insertvalue { i32, i32 } %t0, i32 %b, 1 creates the value with %a and %b as member values. Other ways to produce aggregate values are loads, function arguments, function return values, and literal
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
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
Hi all, Sorry for the inconvenient about the previous post. The files were not attached. So I put them here again. I am a newbie in LLVM and I am trying to replace the function like: old function || new function ============================== ========= int haha(int a) { int haha(int a, char* ID) { ===> }
2008 Sep 12
0
[LLVMdev] CPP API User-level Question: Returning multiple values
...uble %y, 1 ret { i64, double } %b } See the LangRef.html for details on the insertvalue instruction. The -march=cpp backend in SVN trunk supports this too. Also in svn trunk, if you're using the IRBuilder interface you can use the CreateAggregateRet method, which takes care of creating the InsertValueInsts for you. Dan
2008 Sep 12
2
[LLVMdev] CPP API User-level Question: Returning multiple values
...gt; } > > See the LangRef.html for details on the insertvalue instruction. > The -march=cpp backend in SVN trunk supports this too. > > Also in svn trunk, if you're using the IRBuilder interface > you can use the CreateAggregateRet method, which takes care of > creating the InsertValueInsts for you. > > Dan > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
2008 Jun 17
0
[LLVMdev] Transforming ConstantExprs to Instructions
On Tue, Jun 17, 2008 at 8:50 AM, Matthijs Kooijman <matthijs at stdin.nl> wrote: > 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
2008 Sep 12
3
[LLVMdev] CPP API User-level Question: Returning multiple values
Greetings, I'm working on getting our compiler's interface to LLVM to mimic the way the LLVM-GCC inserts instructions to generate AMD64 ABI compliant code. I'm trying to create ret i64 %mrv, double %double_mrv37 which is basically what LLVM-GCC puts out. However if I use lcc -march=cpp to get the API code I need it has the following line:
2008 Sep 12
0
[LLVMdev] CPP API User-level Question: Returning multiple values
...the LangRef.html for details on the insertvalue instruction. >> The -march=cpp backend in SVN trunk supports this too. >> >> Also in svn trunk, if you're using the IRBuilder interface >> you can use the CreateAggregateRet method, which takes care of >> creating the InsertValueInsts for you. >> >> Dan >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > ______________________...
2011 Sep 16
0
[LLVMdev] How to duplicate a function?
Hi all, I am a newbie in LLVM and I am trying to replace the function like: old function || new function ======================================= int haha(int a) { int haha(int a, char* ID) { ===> } } Of course in the newly replaced function "int haha(int,
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,
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,
2012 Jul 31
3
[LLVMdev] rotate
Andy, Here is the left circular shift operator patch. I apologize to the reviewer in advance. The patch has a good bit of fine detail. Any comments/criticisms? Some caveats... 1) This is just the bare minimum needed to make the left circular shift operator work (e.g. no instruction combining). 2) I tried my best to select operator names in the existing style; please feel free to change them as