search for: irbuilding

Displaying 20 results from an estimated 772 matches for "irbuilding".

Did you mean: building
2018 May 03
2
SCEVExpander and IRBuilder
Hi Alex, Sanjoy, exposing the internal IRBuilder to users of SCEVExpander violates information hiding, and encourages the tight coupling that makes code bases such as Polly so hard to maintain. SCEVExpander::expandCodeFor returns a Value that (if it's an instruction) can be used to update the insert point of the client's IRBuilder. Is that not enough? No hidden state, no hidden state
2018 Apr 06
2
SCEVExpander and IRBuilder
Hello, I use SCEVExpander and IRBuilder to generate some code and I frequently end-up breaking dominance because the SCEVExpander insertion point and the IRBuilder insertion point do not advance in synchrony. Ideally, I could build a SCEVExpander based on an existing IRBuilder (so that they move each other). Or even better, SCEVExpander inherit from IRBuilder and basically extend it with SCEV
2020 Feb 05
4
[RFC] IRBuilder polymorphism: Templates/virtual
Hi, The IRBuilder is currently templated over a constant folder, and an instruction inserter. https://reviews.llvm.org/D73835 proposes to move this towards using virtual dispatch instead. As this is a larger design change, I would like to get some feedback on this. The current templated design of IRBuilder has a couple of problems: 1. It's not possible to share code between use-sites that
2018 May 03
0
SCEVExpander and IRBuilder
Hey, Alternatively, expose a SCEVExpander::getInsertPoint? This would proxy the underlying IRbuilder, with no real state sharing, other than the current insert point. This will be less ugly than recieving the expanded SCEV value, casting to an instruction, and feeding this to the IRBuilder. Cheers, siddharth On Thu 3 May, 2018, 15:36 Philip Pfaffe via llvm-dev, < llvm-dev at
2018 Apr 29
0
SCEVExpander and IRBuilder
Hi Alexandre, Sorry I missed this -- I was on vacation when you sent this. SCEVExpander already has an IRBuilder in it but AFAICT it isn't exposed as a public interface. I'd be fine if you wanted to expose a public `GetIRBuilder()` accessor that let a SCEVExpander client use the same IRBuilder as SCEVExpander. -- Sanjoy On Fri, Apr 6, 2018 at 10:55 AM, Alexandre Isoard via llvm-dev
2017 Jun 21
2
question about llvmlite
​Hi all, I am using llvmlite for pyvex and I want the output of my code (which is written based on llvmlite) to be like pyvex. In pyvex, (https://github.com/angr/pyvex). Considering pyvex, I tried to implement the following statements in pyvex to llvmlite: for stmt in irsb.statements: if isinstance(stmt, pyvex.IRStmt.Store): print "ST%s(%s) = %s" % (self.endness[-2:].lower(),
2013 Apr 15
4
[LLVMdev] The most efficient way to compile to LLVM IR?
Hi all, I am trying to compile my toy language to LLVM back end. (I am new to LLVM, so my questions may sound naive) I am looking at some tutorials about LLVM, most are about how to use LLVM IRBuilder, however, I find the API provided by IRBuilder is quite imperative and verbose, and the API changes so fast that most of the tutorials are out of dated. So I am wondering what's
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>
2017 Nov 06
3
[RFC] Setting the current debug loc when the insertion point changes
Hi everybody, I'm investigating some correctness issues with debug line table information in optimized code. I've noticed something problematic in IRBuilder. Setting the insertion point of an IRBuilder sets the builder’s current debug loc to the one attached to the insertion point. IMO this isn't always a correct or convenient thing to do, and it shouldn't be the default behavior.
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
2020 Oct 05
2
Question about using IRBuilder::CreateIntrinsic for a variadic intrinsic
I have a variadic intrinsic that is defined as something like this: def int_foobar : Intrinsic<[llvm_anyint_ty], [llvm_vararg_ty], [IntrNoMem, IntrSpeculatable]>; When I construct a call to the above intrinsic with IRBuilder::CreateIntrinsic, it mangles the intrinsic name with the return type (i64) and the actual argument
2019 Feb 05
2
IRBuilder constraints
Hi, I need to control IRBuilder(or manage IR building with other means) very strictly. The problem is in the realm of ConstInt/GlobalVariable handling, more precisely: LLVM converts llvm::ConstantInt values to GlobalVariable addresses ad-hoc if I store a constant in a GlobalVariable, and it appears to me, that I can do nothing about it. Consider the following, shortened code: ... 0x18: r2 =
2008 Jul 31
2
[LLVMdev] Generating movq2dq using IRBuilder
Hi all, How do I generate the movq2dq SSE2 instruction using the IRBuilder? There is no zext from 64-bit to 128-bit (corresponding to MMX to XMM register transfer) as far as I can tell. So I've tried inserting an i64 into a v2i64, which generates valid code but rather a number of stores and loads on the stack instead of a single movq2dq. Looking though the code, I found a pattern for
2011 Feb 01
2
[LLVMdev] Convenience methods in ConstantExpr et al
I notice that there's a lot of inconsistency in the various LLVM classes with respect to convenience methods. Here's some examples: For creating GEPS, IRBuilder has: CreateGEP (2 overloads) CreateInBoundsGEP (2 overloads) CreateConstGEP1_32 CreateConstInBoundsGEP1_32 CreateConstGEP2_32 CreateConstInBoundsGEP2_32 CreateConstGEP1_64 CreateConstInBoundsGEP1_64
2008 Apr 13
0
[LLVMdev] LLVMBuilder/LLVMFoldingBuilder -> IRBuilder
Hi, the functionality of LLVMFoldingBuilder has been folded into LLVMBuilder, which has been renamed to IRBuilder. If you were using LLVMFoldingBuilder then it should be enough to rename LLVMFoldingBuilder to IRBuilder everywhere (and change the #include from LLVMBuilder to IRBuilder). If you were using LLVMBuilder then as well as renaming LLVMBuilder to IRBuilder you may also need to fix up the
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 =
2017 Nov 06
2
[RFC] Setting the current debug loc when the insertion point changes
> On Nov 6, 2017, at 2:32 PM, Adrian Prantl <aprantl at apple.com> wrote: > > >> On Nov 6, 2017, at 2:19 PM, Vedant Kumar <vsk at apple.com> wrote: >> >> Hi everybody, >> >> I'm investigating some correctness issues with debug line table information in optimized code. I've noticed something problematic in IRBuilder. Setting the
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",
2018 Apr 01
2
[Dwarf] Register a local variable in DIBuilder and locate it later with a DwarfContext
Hi Paul, How can i make this call to intrinsic from the c++ code ? I'm not working with the IR language, but directly in C++ with IRBuilder::CreateAlloca. My goal is that one : - Generate machine code with an instance of the class 'IRBuilder' - Emit 'ObjFile' class instance with MCJIT - Create a DwarfContext instance directly from the emitted ObjFile object
2010 Oct 26
0
[LLVMdev] Prevent instruction elimination
On Oct 26, 2010, at 9:23 AM, Xinfinity wrote: > > Hello, > > > Devang Patel wrote: >> >> >> On Oct 25, 2010, at 12:09 PM, Xinfinity wrote: >> >>> #pragma my_pragma{ >>> code >>> } >> >>> I use a map >>> (source_location, pragma) and I insert the dummy instruction when this >>> location is