Displaying 20 results from an estimated 772 matches for "irbuild".
Did you mean:
rbuild
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 t...
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, SCEVExpand...
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...
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 lists.llvm.org...
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
<llvm-dev a...
2017 Jun 21
2
question about llvmlite
...quot;mehran = -100
llvm.initialize()llvm.initialize_native_target()llvm.initialize_native_asmprinter()
module = ll.Module()func_ty = ll.FunctionType(ll.VoidType(), [])func = ll.Function(module, func_ty, name='read_instructions')a = func.argsbb_entry = func.append_basic_block('entry')irbuilder = ll.IRBuilder(bb_entry)int_type = ll.IntType(64);irsb = pyvex.block.IRSB(CODE, 0x400400, archinfo.ArchAMD64())
for stmt in irsb.statements:
#if isinstance(pyvex.IRStmt.Store): with irbuilder.if_then(stmt, pyvex.IRStmt.Store):
t = irbuilder.load_reg(ll.IntType(64), stmt.data)...
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 the benefit of emitting LLVM IR using
IRBuilder compared with designing my own abstract syntax in a high-lev...
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://lis...
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.
# Correctness
The IRBuilder shouldn't assume that the de...
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 mode. This makes the changes in clang rela...
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 types i32.i32. The mangled name then becomes @llvm.foobar.i64.i32.i32
However this causes the Verifier to fail with:
Intrinsic name not mangled correctly for type arguments! Should be: llvm.f...
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...
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,...
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
CreateConstGEP2_64
CreateConstInBoundsGEP2_64
CreateStructGEP
All of which...
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 types of s...
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 = ConstantInt::get(Type::getInt32Ty(Conte...
2017 Nov 06
2
[RFC] Setting the current debug loc when the insertion point changes
...m> 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 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.
>>
>> # Correctness
>>
>> The IRBuil...
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", Builder.getInt64Ty());
GlobalVariable* gVar = M.getNamedGlobal("globalKey");
gVar->setLinkage...
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
(DwarfContextInMemory) (on JitEventListener::NotifyObjectEmit...
2010 Oct 26
0
[LLVMdev] Prevent instruction elimination
...odeGen. Actually, for each generated
> instruction I should check if it is in the pragma region and in this case
> attach metadata info. I am not sure if tracking all the instructions and
> verifying them is the best idea.
>
> Another idea would be to create a boolean as part of the IRBuilder and set
> it from CodeGen. And for each instruction inserted by the IRBuilder to check
> the boolean and attach metadata if necessary. But I think this is too
> specialized to my particular needs and it would not be a good solution.
> Is there a cleaner method?
Setting a bit in IRBu...