similar to: [LLVMdev] import/export functions between Modules

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] import/export functions between Modules"

2012 Nov 02
4
[LLVMdev] Instruction does not dominate all uses! <badref> ??
I'm having trouble figuring out what the error "Instruction does not dominate all uses!" means. I'm trying to construct a call to a function with two parameters. The printed IR, with error, looks like this: define i32 @add(i32, i32) { EntryBlock: %2 = add i32 %0, %1 ret i32 %2 } define i32 @eval_expr() { EntryBlock: ret i32 <badref> } Instruction does not dominate
2012 Nov 02
0
[LLVMdev] Instruction does not dominate all uses! <badref> ??
edA-qa mort-ora-y wrote: > I'm having trouble figuring out what the error "Instruction does not > dominate all uses!" means. I'm trying to construct a call to a function > with two parameters. The printed IR, with error, looks like this: > > define i32 @add(i32, i32) { > EntryBlock: > %2 = add i32 %0, %1 > ret i32 %2 > } > > define i32
2012 Dec 30
2
[LLVMdev] alignment issue, getting corrupt double values
I'm having an issue where a certain set of types and insert/extractvalue are producing the incorrect values. It appears as though extractvalue getting my sub-structure is not getting the correct data. I have these types: %outer = type { i32, %inner, i1 } %inner = type { double, i32 } The trouble is that when I have a value of type %outer then proceed to extract the components of the
2016 Mar 01
2
Insert CallInst within a function passing same parameters of the calling function.
Hi, supposing I have a function “foo” like the following: int foo(int a, int b) { ... ... } I want to insert int the LLVM IR a call instructions to a function “bar” that requires the same parameters of foo. So my function foo will become: int foo(int a, int b) { bar(a,b); … ... } I am using the following code: bool ThreadSanitizer::runOnFunction(Function &F) {
2012 Nov 11
1
[LLVMdev] wrong value with getPointerToGlobal
I'm having some trouble getting access to a global variable with getPointerToGlobal. The resulting value is not what I am expecting. My assembly looks something like this: @gresult = global i32 undef define i32 @eval_expr() { entry: ... store i32 %3, i32* @gresult ret i32 %3 } Where "gresult" is created with: auto global = new llvm::GlobalVariable( *module, int32Type,
2013 Jul 13
1
[LLVMdev] Inlined call properly optimized, but not function itself
I saw something strange in the optimized LLVM code. It appears that sometimes an inlined function is optimized though the function itself is not optimized to the same level. Below is an example of an unoptimized/non-inlined function call: define void @_entry() uwtable { entry: %0 = call i64 @eval_expr() call void @trace_integer(i64 %0) ret void } 'eval_expr' is a big ugly series
2012 Dec 30
0
[LLVMdev] alignment issue, getting corrupt double values
I also saw this issue before. Llvm seems have trouble returning general struct values from functions. One easy workaround is to use packed struct type. Hope this helps. -Peng On Sunday, December 30, 2012, edA-qa mort-ora-y wrote: > I'm having an issue where a certain set of types and insert/extractvalue > are producing the incorrect values. It appears as though extractvalue >
2012 Nov 02
0
[LLVMdev] Instruction does not dominate all uses! <badref> ??
Hi edA-qa mort-ora-y, On 02/11/12 10:20, edA-qa mort-ora-y wrote: > I'm having trouble figuring out what the error "Instruction does not > dominate all uses!" means. I'm trying to construct a call to a function > with two parameters. The printed IR, with error, looks like this: > > define i32 @add(i32, i32) { > EntryBlock: > %2 = add i32 %0, %1 >
2004 Sep 29
3
7912G SCCP only?
Mmm...I swear I read somehwere that the 7912G did SIP? Cisco lists it as an SCCP only phone? -- Undocumented Features quote of the moment... "It's not the one bullet with your name on it that you have to worry about; it's the twenty thousand-odd rounds labeled `occupant.'" --Murphy's Laws of Combat
2012 Nov 04
0
[LLVMdev] trying to understand linkage with linker
If I create a function in a module with: auto f = module->getOrInsertFunction( "eval_expr", ...) //create function Then later I link this with other modules: Linker link; link.LinkInModule( base_module ); link.LinkInModule( module ); Then I create an execution engine something like: auto ee = EngineBuilder( link.getModule() )...create(); If I attempt to run the function
2012 Nov 02
2
[LLVMdev] Instruction does not dominate all uses! <badref> ??
Okay, I've think I understand now. By using a "Value" object (like a function call) in another instruction does nothing more than use a reference to that value. It is still my responsibility to ensure that value/reference is actually created prior to its use in the block. On 02/11/12 12:16, Nick Lewycky wrote: > edA-qa mort-ora-y wrote: >> I'm having trouble figuring
2015 Mar 20
2
Samba AD DC and browsing of shares
----- V?stule no Rowland Penny <rowlandpenny at googlemail.com> --------- Datums: Fri, 20 Mar 2015 09:19:10 +0000 S?t?t?js: Rowland Penny <rowlandpenny at googlemail.com> Temats: Re: [Samba] Samba AD DC and browsing of shares Sa??m?js: samba at lists.samba.org >>> You can recompile it if you want to, but if you use packages from >>> your distro, you
2006 Apr 12
2
ActiveRecord Parent-Child relationship bug? config problem?
If i have a parent that has_many :children, and the child belongs_to :parent. Then when I add a new child to the parent like so: parent.children << Child.new, then shouldn''t the child also have a reference to the parent? but it doesn''t-- child.parent is nil-- what''s going on here? is this as it should be-- shouldn''t it have a reference to the
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) { ===> }
2012 Dec 30
2
[LLVMdev] alignment issue, getting corrupt double values
I can confirm that if I generate the value directly (not via a return) then the expected values are extracted from the structure. So it is perhaps a return value issue. On 30/12/12 19:04, Peng Cheng wrote: > I also saw this issue before. Llvm seems have trouble returning general > struct values from functions. One easy workaround is to use packed > struct type. > > Hope this
2018 Dec 09
2
Parse LLVM IR
Hello, I am a newbie to LLVM and right now I am on the hook to parse some IR code and do some instrumentations. However, my problem is that no matter how I tweak my parsing code, it simply cannot print out anything. So here is my C code: int your_fun(int arg2) { int x = arg2; return x+2; } And here is my parsing code: #include <llvm/IR/Module.h> #include
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
2013 May 29
2
[LLVMdev] CloneFunctionInto() Error
Dear All, I need your help urgently I have to copy the CFG of each function using CloneFunction or CloneFunctionInto. After I made the copy function. Print the basic blocks then get this error : While deleting: i32 % Use still stuck around after Def is destroyed: %mul2_ = mul nsw i32 %6, 3 Use still stuck around after Def is destroyed: store i32 3, i32* %x_, align 4 opt: Value.cpp:75: virtual
2009 Nov 05
2
[LLVMdev] create dummy function
Hello, I have a simple question. How to create "dummy" function which will have no functionality behind (return nothing and do nothing)? Currently I'm trying to do this: llvm::Constant* c = Module.getOrInsertFunction("dummy", FunctionThatNeedsToBeReplaced.getFunctionType()); llvm::Function* dummy = llvm::cast<llvm::Function>(c); This way I create new function that
2009 Nov 05
3
[LLVMdev] create dummy function
Thank you very much for you help, Renato! I read through paper you referred and also this document - http://llvm.org/docs/tutorial/JITTutorial1.html Following these instructions to create successful function I run into some problems: 1) llvm::getGlobalContext() does not exists anymore? "llvm/LLVMContext.h" too? 2) creating instance of IRBuilder don't require template (from tutorial