similar to: IRBuilder Assignment ( '=' ) operator?

Displaying 20 results from an estimated 3000 matches similar to: "IRBuilder Assignment ( '=' ) operator?"

2016 Mar 16
3
IRBuilder Assignment ( '=' ) operator?
However I need the standard assignment operator so I can assign the value of a temporary to that of another temporary, or to create a new temporary from an existing one. - Paul ________________________________________ From: Tim Northover <t.p.northover at gmail.com> Sent: 16 March 2016 13:11 To: Paul Hancock Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] IRBuilder Assignment (
2016 Mar 16
3
IRBuilder Assignment ( '=' ) operator?
I partially worked out that to do an assign I will need to manually assign a temporary first and then load data into it, which also means I'll need to set up a temporaries list in my code assembler as allocations must be done before anything else? or is it fine to allocate a variable mid-way through a function and the compiler will manage it? With that as well, if I had a function that loads
2011 Jul 31
2
[LLVMdev] "Cannot select" error in 2.9
Gregory Junker wrote: > >> Actually, it was new in *2.6*, which was released almost two years >> ago. It's documented here: >> <http://llvm.org/releases/2.6/docs/ReleaseNotes.html#coreimprovements>. > > Interesting -- then I guess my question is why 2.8 (which is the first version of LLVM I've used) didn't flag this? > > Either way, it makes sense
2019 Jan 16
2
[FPEnv] Rust/Go/Swift/Flang/other llvm IRBuilder needs?
I've got a ticket open where I would very much like some input from maintainers of other languages that rely on llvm and use the IRBuilder. See: Teach the IRBuilder about constrained fadd and friends: https://reviews.llvm.org/D53157 I'm adding support to functions like CreateFAdd() the ability to optionally emit the constrained math intrinsics required to support strict floating point
2010 Jun 21
1
[LLVMdev] [PATCH] docs/tutorial/ Kaleidoscope typos
On Mon, 21 Jun 2010 15:31:57 -0500, Chris Lattner <clattner at apple.com> wrote: > Applied in r106468, thanks! > > -Chris I think there's a few bugs left in the Kaleidoscope tutorial -- I noticed somebody converted some of the "Builder.CreateAdd" to CreateFAdd, etc., but there seem to be a few that got missed. Attached diff is what I could find... Kevin Kelley
2011 Jul 30
0
[LLVMdev] "Cannot select" error in 2.9
> Actually, it was new in *2.6*, which was released almost two years > ago. It's documented here: > <http://llvm.org/releases/2.6/docs/ReleaseNotes.html#coreimprovements>. Interesting -- then I guess my question is why 2.8 (which is the first version of LLVM I've used) didn't flag this? Either way, it makes sense and changing my API usage to call CreateFAdd instead of
2011 Jul 31
0
[LLVMdev] "Cannot select" error in 2.9
> -----Original Message----- > From: Nick Lewycky [mailto:nicholas at mxc.ca] > Sent: Saturday, July 30, 2011 6:13 PM > To: Gregory Junker > Cc: 'Frits van Bommel'; llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] "Cannot select" error in 2.9 > > Gregory Junker wrote: > > > >> Actually, it was new in *2.6*, which was released almost two
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
It seems that the problem was because I used builder.CreateFAdd to create a <2 x double> vectortype FADD instruction. It works if I use it to create the scalar version FADD. I want to have an instruction like: *%2 = fadd <2 x double> undef, <2 x double> undef. *The following is the way I used to create the vectorized FADD instruction: //pInst is a double type instruction
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
Thanks Nick, that's something what I am trying to implement as the following. But it seems I still only get the constant value not the instruction. Could you please go over the following instruction and see what wrong with it? Thanks for your time again. Value *vecVal = NULL; IRBuilder<> builder(&*pInst); Type *vecTy = VectorType::get(Type::getDoubleTy(ctxt), 2); Value
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
I got it. Thanks, Nick. So, it is back to the previous problem. If I have the following instruction: %3 = fadd double %1, double %2 I want to change it into %6 = fadd <2 x double> %4, double %5 where %4 = <double %1, double %1>, %5 = <double %2, double %2>, how can I do this? Thanks, Best On Fri, Apr 17, 2015 at 1:56 AM, Nick Lewycky <nicholas at mxc.ca> wrote: >
2011 Jul 30
2
[LLVMdev] "Cannot select" error in 2.9
On 30 July 2011 23:39, Gregory Junker <gjunker at dayark.com> wrote: >> From: Nick Lewycky [mailto:nicholas at mxc.ca] [snip] >> Gregory Junker wrote: >> > That doesn't make a lot of sense to me -- LLVM can't add doubles? >> >> No, LLVM can't, but it can fadd them. ;) "add" only accepts integers >> and >> vectors of integers,
2015 Apr 23
4
[LLVMdev] IRBuilder and "ad hoc" optimizations
Hi LLVM, IRBuilder can fold constants (that behaviour can be controlled by Folder type). What do you think about optionally allow IRBuilder to eliminate no-op instructions like `add %a, 0` or `memcpy(%a, %b, 0)`? - Paweł -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150423/4f99a092/attachment.html>
2015 Mar 10
4
[LLVMdev] noob IR builder question
I am trying to get a handle on IR builder, at least some basics. I ran through a tutorial here: Create a working compiler with the LLVM framework, Part 1 <http://www.ibm.com/developerworks/library/os-createcompilerllvm1/>, and it worked well enough. I have some simple code that creates a hello world IR. I am trying to now bring in some concepts from the Kaleidoscope tutorial, namely
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
Hi Everyone, I'm quite new to LLVM and I want to update value of global variable in LLVM IR. I created new global variable in ModulePass: bool runOnModule(llvm::Module &M) { IRBuilder<> Builder(M.getContext()); Instruction *I = &*inst_begin(M.getFunction("main")); Builder.SetInsertPoint(I); M.getOrInsertGlobal("globalKey",
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
Value * is the instruction. use dyn_cast<Instruction> to get to it. On Thu, Apr 16, 2015 at 11:39 PM zhi chen <zchenhn at gmail.com> wrote: > But IRBuilder.CreateXYZ only returns a "VALUE" type. Can I get the > instruction created by it? For example, > > IRBuilder<> builder(&*pinst); > Value *val = builder.CreateFAdd(LV, RV, ""); >
2020 Jun 03
2
Fwd: I cannot change value of global variable in LLVM IR using IRBuilder
I don't think it's the same problem as you described. By printing I meant calling printf function and passing my global variable as one of the arguments. My code: Instruction* InstructionVisitor::incrementGlobalKey(Instruction* I) { IRBuilder<> Builder(I->getContext()); Builder.SetInsertPoint(I->getNextNode()); GlobalVariable* key =
2010 Jun 03
2
[LLVMdev] [PATCH] docs/tutorial/ Kaleidoscope typos
Index: docs/tutorial/LangImpl6.html =================================================================== --- docs/tutorial/LangImpl6.html (revision 105365) +++ docs/tutorial/LangImpl6.html (working copy) @@ -531,7 +531,7 @@ def unary-(v) 0-v; -# Define &gt; with the same precedence as &gt;. +# Define &gt; with the same precedence as &lt;. def binary&gt; 10 (LHS RHS)
2010 Jun 21
0
[LLVMdev] [PATCH] docs/tutorial/ Kaleidoscope typos
Applied in r106468, thanks! -Chris On Jun 2, 2010, at 5:23 PM, Adam Warner wrote: > Index: docs/tutorial/LangImpl6.html > =================================================================== > --- docs/tutorial/LangImpl6.html (revision 105365) > +++ docs/tutorial/LangImpl6.html (working copy) > @@ -531,7 +531,7 @@ > def unary-(v) > 0-v; > > -# Define &gt; with
2018 Aug 07
2
Create an Add Instruction in LLVM IR
I want to create an add instruction that takes two constant operands at the LLVM IR level. I use the IRBuilder class, but nothing happens. Here is part of the runOnFunction() method of my function pass: ... LLVMContext &Context = F.getContext(); IRBuilder<> builder(&Instruction); Value *Lef = ConstantInt::get(Type::getInt32Ty(Context), 4); Value *Rig =
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
Yes. That's what I was the solution in my mind. But I just wanted to know if there was a generic way to save some code... On Thu, Apr 16, 2015 at 8:32 PM, Tim Northover <t.p.northover at gmail.com> wrote: > > I understand that I can detect the operation first, and use "create" to > > create for each of them. But I don't if there is a generic way to do this