search for: printf1

Displaying 7 results from an estimated 7 matches for "printf1".

Did you mean: printf
2008 Nov 16
2
[LLVMdev] How do I insert a printf call in the IR?
Thanks a lot Nick -march=cpp was very helpful. But I still have a small problem, I am trying to insert a printf in a transformation pass. So when the original program already has a printf, on executing the transformation pass, it tries to create function "printf1" instead of "printf" Am I missing something here? Thanks again! Mrunal ----- Original Message ----- From: "Nick Lewycky" <nicholas at mxc.ca> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Sent: Saturday, November 15, 2008 7:49:09 PM GM...
2013 Dec 17
2
[LLVMdev] Add call printf instructions problems
...[4 x i8] c"%d\0A\00" ; Function Attrs: nounwind uwtable define i32 @main() #0 { entry: %retval = alloca i32, align 4 %a = alloca i32, align 4 store i32 0, i32* %retval // this is the instruction that I inserted ,which calls a C Lib "printf" %0 = call i32 (i8*, ...)* @printf1(i8* getelementptr inbounds ([4 x i8]* @.str2, i32 0, i32 0), i32 2) store i32 3, i32* %a, align 4 %1 = load i32* %a, align 4 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %1) %2 = load i32* %a, align 4 ret i32 %2 } declare i32 @print...
2013 Dec 16
0
[LLVMdev] Add call printf instructions problems
Hi Jin, It's difficult to say just from looking at a pass, but one thing looked odd: > CallInst *call_print = CallInst::Create(call_print,paramArrayRef,"",ins_temp); This looks very dodgy. The "call_print" being used as an argument is the (uninitialised) one that's just been declared. This could be the source of the assertion failure (though a segfault is just as
2013 Dec 16
3
[LLVMdev] Add call printf instructions problems
Hello, everyone! I want to write a pass which can insert a call "printf" instructions before every instruction in the LLVM IR. here is what I wrote: namespace { class call_print : public FunctionPass{ private: DenseMap<const Value*, int> inst_map; public: static char ID; call_print() : FunctionPass(ID){} //define a extern function "printf" static llvm::Function*
2008 Nov 16
0
[LLVMdev] How do I insert a printf call in the IR?
Shah, Mrunal J wrote: > Once I have the function > to make a call to this function I use > > CallInst::Create(myPrint, args.begin(), args.end(),"", B); > > But I am not being able to pass a string into the argument vector. > should I define args as > std::vector<const Type*> args; > or > std::vector<const PointerType*> args; > or >
2008 Nov 16
2
[LLVMdev] How do I insert a printf call in the IR?
Hi Everyone, I want to generate IR for the following C code printf("Hello World!"); To insert a printf call in the IR, I use Function* myPrint = M.getFunction("printf"); to get the function from my symbol table. Once I have the function to make a call to this function I use CallInst::Create(myPrint, args.begin(), args.end(),"", B); But I am not being able to
2016 Aug 18
5
[PATCH v2 0/4] New getprogname module
...ts/test-yesno.c | 3 - tests/uniname/test-uninames.c | 3 - tests/uninorm/test-u32-nfc-big.c | 2 - tests/uninorm/test-u32-nfd-big.c | 2 - tests/uninorm/test-u32-nfkc-big.c | 2 - tests/uninorm/test-u32-nfkd-big.c | 2 - tests/unistdio/test-u16-vsnprintf1.c | 3 - tests/unistdio/test-u16-vsprintf1.c | 3 - tests/unistdio/test-u32-vsnprintf1.c | 3 - tests/unistdio/test-u32-vsprintf1.c | 3 - tests/unistdio/test-u8-vsnprintf1.c | 3 - tests/unistdio/test-u8-vsprintf1.c | 3 - tests/unistdio/test-ulc-vsnprintf1.c | 3 - tests/unistd...