similar to: [LLVMdev] Arguments to IRBuilder CreateCall function

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Arguments to IRBuilder CreateCall function"

2014 Dec 31
5
[LLVMdev] outlining in llvm
Hi, I have some questions regarding outlining (extracting piece of code into a function): 1. Is there an outlining pass in llvm (IR)? I've found out CodeExtractor pass, but I'm not sure it's exactly the same idea. 2. How do I set the function name? And another question: Where do I control the execution of my pass? I'm writing a pass that first works on
2015 Apr 19
3
[LLVMdev] global allocation IR instruction
Hi all, In order to allocate memory on the stack there is AllocaInst instruction. What is the similar instruction/way to allocate memory on the global area? Thanks, Tehila. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150419/54298396/attachment.html>
2015 May 25
2
[LLVMdev] global variable uses
Hi, I'm trying to change all uses of a global variable so they'll use a different global variable. For instance, I have: @a = global [100 x [100 x i64]] zeroinitializer, align 16 @b = global [100 x [100 x i64]] zeroinitializer, align 16 And I want to change the use %arrayidx = getelementptr inbounds [100 x [100 x i64]]* @a, i32 0, i64 %3 to %arrayidx = getelementptr inbounds
2015 Dec 29
2
Running DCE after my pass
Hi, I wrote an IR pass and it adds some instructions that are not used. For example: %1 = call i64 @foo() When %1 is not used at all. I thought that running DCE (-dce) or DIE (-die) after my pass will remove such instructions, but it didn't. Why? And is there a way to do that? Thanks, Tehila. -------------- next part -------------- An HTML attachment was scrubbed...
2014 Mar 29
2
[LLVMdev] Cast specific pointer type to generic one
Hi, Suppose I have a pointer to "something" (a structure I defined) and I want to pass the pointer to a generic function, that gets a 64-bit address pointer. How do I do that? For instance: The function is: void Foo (void *); I get the specific pointer using getPointerOperand() on a store instruction that store to it: inst->getPointerOperand()->getType() Now I want
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",
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 =
2015 Nov 03
3
how to add the location debug info for each instruction
Hello, For some reason, I have to stick on llvm 3.3 for a language compiler, I find that the location debug info is attached to each instruction using !dbg, however, I found some of that information is mis-attched and need to be changed, so I want to *know what functions(I checked all funcs in DIBuilder.h but didn't find a appropriate one) are used to attach those !dbg nodes to each
2010 Jun 26
2
[LLVMdev] IRBuilder<>::CreateCall, CreateCall2, CreateCall3, ...
Hey guys, Whys are there like 5 variants of CreateCall in IRBuilder<> with numbers appended to them? The only difference I can see is the number of arguments. Aren't C++ function overloads be suited for this? Félix
2010 Jun 26
0
[LLVMdev] IRBuilder<>::CreateCall, CreateCall2, CreateCall3, ...
On Jun 25, 2010, at 6:24 PM, Félix Cloutier wrote: > Hey guys, > > Whys are there like 5 variants of CreateCall in IRBuilder<> with numbers appended to them? The only difference I can see is the number of arguments. Aren't C++ function overloads be suited for this? An overload could work, but this sort of API makes it more obvious which one you're trying to call and
2015 Jun 18
3
[LLVMdev] problem with replacing an instruction
I am trying to change this define void @main(float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = bitcast float* %arg1 to <4 x float>* intothis define void @main(float* noalias %arg0, float* noalias %arg1, float* noalias %arg2) { entrypoint: %0 = getelementptr float* %arg1, i64 0 %1 = bitcast float* %0 to <4 x float>* I must be close but
2017 Oct 14
2
Bug in replaceUsesOfWith: does not keep addrspace consistent in GEP
Hello, Calling `replaceUsesOfWith` with a value in a different addrspace does not keep the addrspace of a GEP consistent. Is this known? Is this a bug or expected behaviour? Minimal counterexample link <https://gist.github.com/bollu/152ba5e1c20c03c7fc6d8c7b23ba828f> Reproduced here: #include <iostream> #include "llvm/ADT/APFloat.h" #include
2008 Mar 25
2
[LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64
Hello, Trying to get my machine building up-to-date, and a nightly going, i ran into an assertion during the build of llvm-gcc 4.2: $ make -j2 <snip!> /home/chandlerc/code/compilers/build/llvm-gcc/./gcc/xgcc -B/home/chandlerc/code/compilers/build/llvm-gcc/./gcc/ -B/home/chandlerc/code/compilers/install/llvm-gcc/x86_64-pc-linux-gnu/bin/
2020 Feb 27
3
How to set DebugLoc when using IRBuilder's CreateCall ?
Hi I want to insert some functions into the llvm bitcode ir files. So I use IRBuilder and CreateCall(). But it how error : inlinable function call in a function with debug info must have a !dbg location. I don't know what DebugLoc should I give the new CallInst to setDebugLoc. I Create this CallInst , so this CallInst doesn't hava so-called "DebugLoc" mapping to the source
2008 Mar 25
0
[LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64
Hi Chandler, This looks like a FE error, so you probably won't be able to get an LLVM bitcode file for us. You could help by whittling the test case down to something managable. First get a preprocessed file. Then I would suggest following the instructions on this page to reduce the testcase: http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction That will help us a lot with the bug
2015 Jul 09
2
[LLVMdev] llvm jit acting at runtime, like libgccjit ?
<div>Thanks James,</div><div>š</div><div>Kaleidoscope seems to differ in the sense that I cannot really understand how to create, say, a loop. It all looks like very complicated (<a
2015 Aug 18
3
[RFC PATCH 1/2] [clang]: Add AuxAttr support
This patch adds EmitTypeAuxAttribute() function to CGDebugInfo, which allows other parts of clang issue auxiliary information through an enumeration type in Dwarf information. For example, by calling DI->EmitTypeAuxAttribute(type, "ID", 1234); We can get following information in dwarf: <1><3f>: Abbrev Number: 3 (DW_TAG_structure_type) <40> DW_AT_name
2010 Jan 08
3
[LLVMdev] Cygwin llvm-gcc regression
I am getting an assertion firing while building TOT llvm-gcc on Cygwin in libgcc2.c :- /home/ang/build/llvm-gcc/./gcc/xgcc -B/home/ang/build/llvm-gcc/./gcc/ -B/home/an g/llvm-gcc/i686-pc-cygwin/bin/ -B/home/ang/llvm-gcc/i686-pc-cygwin/lib/ -isystem /home/ang/llvm-gcc/i686-pc-cygwin/include -isystem /home/ang/llvm-gcc/i686-pc-c ygwin/sys-include -O2
2012 Oct 18
1
[LLVMdev] Incrementing a pointer to array element?
Using the LLVM C++ API, if I want to create an array via an Alloca instruction like: Value *a = ir_builder.CreateAlloca( my_type, my_size ); and then I want to initialize each element of the array with values computed elsewhere like: for ( vector<Value*>::const_iterator i = v.begin(); i != v.end(); ++i ) { builder.CreateStore( *i, a ); // How do I increment 'a' to point to
2008 Mar 27
2
[LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64
Bam. This is about as reduced as it gets. I think I can spot the problem point: chandlerc at osiris ~/code/compilers/build/llvm-gcc $ cat testcase.i void foo () { float x __attribute__ ((mode (XF))); } chandlerc at osiris ~/code/compilers/build/llvm-gcc $ ./gcc/cc1 -fpreprocessed -march=k8 testcase.i -o /dev/null foocc1: /home/chandlerc/code/compilers/llvm-gcc/gcc/llvm-types.cpp:81: const