search for: optimizecall

Displaying 9 results from an estimated 9 matches for "optimizecall".

2013 Feb 19
5
[LLVMdev] [RFC] NoBuiltin Attribute
...gt; > I have: > > void foo() { > printf("hello\n"); > } > > and I build with -fno-builtin-puts. If I understand correctly, *foo* will be marked with "nobuiltin", but this code in simplifylibcalls looks at the printf: > > Value *LibCallSimplifier::optimizeCall(CallInst *CI) { > + Function *F = CI->getCalledFunction(); > + if (F->hasFnAttribute(Attribute::NoBuiltin)) return 0; > return Impl->optimizeCall(CI); > } > > In the context of LTO, it makes sense for the attribute to be on function bodies, not on prototypes. > Y...
2013 Feb 19
0
[LLVMdev] [RFC] NoBuiltin Attribute
...makes sense, but the implementation does not. I have: void foo() { printf("hello\n"); } and I build with -fno-builtin-puts. If I understand correctly, *foo* will be marked with "nobuiltin", but this code in simplifylibcalls looks at the printf: Value *LibCallSimplifier::optimizeCall(CallInst *CI) { + Function *F = CI->getCalledFunction(); + if (F->hasFnAttribute(Attribute::NoBuiltin)) return 0; return Impl->optimizeCall(CI); } In the context of LTO, it makes sense for the attribute to be on function bodies, not on prototypes. -Chris
2013 Feb 19
0
[LLVMdev] [RFC] NoBuiltin Attribute
...;> void foo() { >> printf("hello\n"); >> } >> >> and I build with -fno-builtin-puts. If I understand correctly, *foo* will be marked with "nobuiltin", but this code in simplifylibcalls looks at the printf: >> >> Value *LibCallSimplifier::optimizeCall(CallInst *CI) { >> + Function *F = CI->getCalledFunction(); >> + if (F->hasFnAttribute(Attribute::NoBuiltin)) return 0; >> return Impl->optimizeCall(CI); >> } >> >> In the context of LTO, it makes sense for the attribute to be on function bodies, not...
2013 Feb 18
5
[LLVMdev] [RFC] NoBuiltin Attribute
Hi LLVMites! This patch adds the 'nobuiltin' attribute to to LLVM. This is needed during LTO, which right now ignores this attribute and command line flag. I want to make this an IR-level attribute instead of a target-dependent attribute because it's used during IR modification and not code generation. -bw -------------- next part -------------- A non-text attachment was scrubbed...
2013 Feb 19
0
[LLVMdev] [RFC] NoBuiltin Attribute
...) { > > printf("hello\n"); > > } > > > > and I build with -fno-builtin-puts. If I understand correctly, *foo* > will be marked with "nobuiltin", but this code in simplifylibcalls looks at > the printf: > > > > Value *LibCallSimplifier::optimizeCall(CallInst *CI) { > > + Function *F = CI->getCalledFunction(); > > + if (F->hasFnAttribute(Attribute::NoBuiltin)) return 0; > > return Impl->optimizeCall(CI); > > } > > > > In the context of LTO, it makes sense for the attribute to be on > function...
2012 Jun 18
0
[LLVMdev] Which pass converts call printf to puts?
...implifyLibCalls::runOnFunction(). If you browse the code a bit and backtrack the call stack to see what happens with the return value of PrintFOpt::OptimizeFixedFormatString(), you will stumble upon this segment in SimplifyLibCalls.cpp:1703ff.: // Try to optimize this call. Value *Result = LCO->OptimizeCall(CI, TD, TLI, Builder); if (Result == 0) continue; DEBUG(dbgs() << "SimplifyLibCalls simplified: " << *CI; dbgs() << " into: " << *Result << "\n"); // Something changed! Changed = true; ++NumSimplified; // Inspect the instruction...
2012 Jun 17
5
[LLVMdev] Which pass converts call printf to puts?
I found that LLVM optimized the IR by replacing printf with puts. I wondered which pass did this optimization? And is it common that puts is faster (and some other metric) than printf? -- Thanks Thomson -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120617/08aa6c45/attachment.html>
2013 Feb 19
4
[LLVMdev] [RFC] NoBuiltin Attribute
...gt;> printf("hello\n"); >>> } >>> >>> and I build with -fno-builtin-puts. If I understand correctly, *foo* will be marked with "nobuiltin", but this code in simplifylibcalls looks at the printf: >>> >>> Value *LibCallSimplifier::optimizeCall(CallInst *CI) { >>> + Function *F = CI->getCalledFunction(); >>> + if (F->hasFnAttribute(Attribute::NoBuiltin)) return 0; >>> return Impl->optimizeCall(CI); >>> } >>> >>> In the context of LTO, it makes sense for the attribute to be...
2012 Jun 18
2
[LLVMdev] Which pass converts call printf to puts?
...n(). If > you browse the code a bit and backtrack the call stack to see what > happens with the return value of PrintFOpt::OptimizeFixedFormatString(), > you will stumble upon this segment in SimplifyLibCalls.cpp:1703ff.: > > // Try to optimize this call. > Value *Result = LCO->OptimizeCall(CI, TD, TLI, Builder); > if (Result == 0) continue; > > DEBUG(dbgs() << "SimplifyLibCalls simplified: " << *CI; > dbgs() << " into: " << *Result << "\n"); > > // Something changed! > Changed = true; > ++NumSim...