search for: pointerty_0

Displaying 4 results from an estimated 4 matches for "pointerty_0".

Did you mean: pointerty_1
2013 Sep 28
1
[LLVMdev] use function address as global variable initializer
Hi I would like to initialize a global variable to the address of a function. Looking at how clang compiles the C code below, i see @main_ptr = global i8* bitcast (i32 ()* @main to i8*), align 8 but how do i generate i8* bitcast (i32 ()* @main to i8*), align 8 in LLVM IR and use it as initializer to a GlobalVariable. I know i will need to use the bitcast instruction. but as far i as i
2011 Apr 26
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila, > where did the "noalias" attribute and "tail call" (rather than "call") come > from? Are you setting these yourself or running some optimization pass after > your pass? > > > i have written a module pass and i have compiled it and then you didn't answer my questions, you just repeated what you said before. Ciao,
2011 Apr 26
1
[LLVMdev] inserting a fucntion call at the end of basic bloc
...ound in the pass i just put instead of this opt -load /home/inspiron/PhdWork/llvm-2.8/Release/lib/Example.so -Example2 < hello.bc > /dev/null i put this opt -load /home/inspiron/PhdWork/llvm-2.8/Release/lib/Example.so -Example2 < hello.bc > hello2.bc the declaration is: PointerType* PointerTy_0 = PointerType::get(IntegerType::get(M.getContext(), 32), 0); std::vector<const Type*>FuncTy_3_args; FuncTy_3_args.push_back(IntegerType::get(M.getContext(), 32)); FuncTy_3_args.push_back(PointerTy_0); FunctionType* FuncTy_3 = FunctionType::get...
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
2011/4/26 Duncan Sands <baldrick at free.fr> > Hi Nabila, > > Now when i tried this pass an error says: >> Wrong type for attribute noalias >> tail call void @consume(i32 noalias 3, i32* @y) nounwind >> >> >> noalias is only for arguments of pointer type. You probably meant it >> to >> be on the second argument