Displaying 20 results from an estimated 55 matches for "inlinefunction".
2012 Nov 09
2
[LLVMdev] Inlining bitcast functions...
...(void (%4 addrspace(1)*, <2 x i32>, <4 x float>)* @_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f to void (%9 addrspace(1)*, <2 x i32>, <4 x float>)*)(%9 addrspace(1)* %dstimg, <2 x i32> %28, <4 x float> %26) nounwind
%4 and %9 are both (stripped) opaque structs.
InlineFunction() does not inline this because call->getCalledFunction() returns 0. call->getCalledValue() returns a cast ConstantExpr. The called Function * is available at (leaving out necessary casts and checks) call->getCalledValue()->getOperand(0). I've tried using call->setCalledFunction()...
2012 Nov 09
0
[LLVMdev] Inlining bitcast functions...
...e(1)*, <2 x i32>, <4 x float>)* @_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f to void (%9 addrspace(1)*, <2 x i32>, <4 x float>)*)(%9 addrspace(1)* %dstimg, <2 x i32> %28, <4 x float> %26) nounwind
>
> %4 and %9 are both (stripped) opaque structs.
>
> InlineFunction() does not inline this because call->getCalledFunction() returns 0. call->getCalledValue() returns a cast ConstantExpr. The called Function * is available at (leaving out necessary casts and checks) call->getCalledValue()->getOperand(0). I've tried using call->setCalledFunction()...
2015 Aug 21
4
[RFC] AlwaysInline codegen
...on time
(c) feels like patching over a bigger problem.
The following, better, idea was suggested by Chandler Carruth and Richard Smith.
Instead of emitting an available_externally definition for an
alwaysinline function, we emit a pair of
1. internal alwaysinline definition (let's call it F.inlinefunction -
it demangles nicely)
2a. A stub F() { musttail call F.inlinefunction }
-- or --
2b. A declaration of F.
The frontend ensures that F.inlinefunction is only used for direct
calls, and the stub is used for everything else (taking the address of
the function, really). Declaration (2b) is emitted...
2009 May 27
0
[LLVMdev] Wondering how best to run inlining on a single function.
...acts as a FunctionPass and add that to our normal
> FunctionPassManager. Can you guys see anything that will go wrong if I
> do that? Is there a better way, or an option that doesn't involve
> writing new code?
Hi Jeffrey,
Does this need to be an actual pass? You can just call the
InlineFunction API to inline individual call sites as needed, check
out llvm/Transforms/Utils/Cloning.h. CloneAndPruneFunctionInto is a
particularly useful function if you're doing argument specialization,
because it is very efficient at handling this (better than inlining a
bunch of code and then de...
2009 May 26
3
[LLVMdev] Wondering how best to run inlining on a single function.
In Unladen Swallow we (intend to) compile each function as we
determine it's hot. To "compile" a function means to translate it from
CPython bytecode to LLVM IR, optimize the IR using a
FunctionPassManager, and JIT the IR to machine code. We'd like to
include inlining among our optimizations. Currently the Inliner is a
CallGraphSCCPass, which can only be run by the
2013 Aug 30
1
[LLVMdev] Are instr_iterators invalidated when function inlining is performed?
...nst_begin(f), ie = inst_end(f); i != ie; ++i) {
if ( CallInst* ci = dyn_cast<CallInst>(&*i) )
{
if ( ci->getCalledFunction() == klee_check_divF)
{
std::cout << "Trying to inline klee_div_zero_check" << std::endl;
InlineFunctionInfo IFI(0,0);
if (InlineFunction(ci,IFI))
{
std::cout << "Did inline" << std::endl; std::cout.flush();
}
else
std::cout << "Failed to inline" << std::endl;
}
}...
2015 Aug 21
2
[cfe-dev] [RFC] AlwaysInline codegen
...gt;
> > The following, better, idea was suggested by Chandler Carruth and
> Richard Smith.
> >
> > Instead of emitting an available_externally definition for an
> > alwaysinline function, we emit a pair of
> > 1. internal alwaysinline definition (let's call it F.inlinefunction -
> > it demangles nicely)
> > 2a. A stub F() { musttail call F.inlinefunction }
> > -- or --
> > 2b. A declaration of F.
>
> I have no idea why always_inline function definitions are being marked as
> available_externally. There is zero reason to think that they’...
2012 Nov 09
3
[LLVMdev] Inlining bitcast functions...
...>, <4 x float>)* @_Z12write_imagefPU3AS110_image2d_tDv2_iDv4_f to void (%9 addrspace(1)*, <2 x i32>, <4 x float>)*)(%9 addrspace(1)* %dstimg, <2 x i32> %28, <4 x float> %26) nounwind
>>
>> %4 and %9 are both (stripped) opaque structs.
>>
>> InlineFunction() does not inline this because call->getCalledFunction() returns 0. call->getCalledValue() returns a cast ConstantExpr. The called Function * is available at (leaving out necessary casts and checks) call->getCalledValue()->getOperand(0). I've tried using call->setCalledFunction()...
2014 Aug 04
3
[LLVMdev] Matching up inlined basic blocks with original basic blocks.
Hello All,
I have some data tied to the basic blocks in a function, and after inlining
that function, I'd like to recover that data in the inlined version. Is
there some way to match up the inlined version of the function with the
original basic blocks?
Thanks,
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Mar 15
2
[LLVMdev] Inline hints for *compiler clients*
...itten source code. John was asking about a compiler pass
>> or tool written by a compiler developer, not a user.
>>
>> These arguments apply to users but not compiler developers. What
>> do you think about the latter?
>
> Why can't the compiler pass just call InlineFunction(CallSite) on
> the callsite it wants inlined? The only way that can fail is if
> LLVM cannot ever inline the call (e.g. it uses varargs).
In some cases, that would be fine. But in other cases:
(1) It cannot "un-inline" any function that was previously inlined.
(2) It require...
2015 Oct 12
2
[RFC] Clean up the way we store optional Function data
...x/prologue data after functions are created. Are there any places
> where we need/want to add them after the fact?
I think so. I see:
LinkModules.cpp: Dst.setPrefixData(MapValue(Src.getPrefixData(), ValueMap,
BitcodeReader.cpp: FunctionPrologueWorklist.back().first->setPrologueData(C);
InlineFunction.cpp: Caller->setPersonalityFn(CalledPersonality);
Some of these sites could be refactored so that the Functions are created with the prefix/prologue data they need. I don't think that's possible for personality functions (see my third example).
Would we inhibit any future patches which...
2009 Nov 05
0
[LLVMdev] Debug Information for LLVM 2.6 and TOT
...DbgKind, I)) {
+ MDNode *NewMD = UpdateInlinedAtInfo(IMD, TheCallMD, Context);
+ Context.getMetadata().addMD(DbgKind, NewMD, I);
+ }
RemapInstruction(I, ValueMap);
+ }
}
// Defer PHI resolution until rest of function is resolved, PHI resolution
Index: Utils/InlineFunction.cpp
===================================================================
--- Utils/InlineFunction.cpp (revision 86036)
+++ Utils/InlineFunction.cpp (working copy)
@@ -386,7 +386,7 @@
// (which can happen, e.g., because an argument was constant), but we'll be
// happy with whatever the...
2015 Jun 17
3
[LLVMdev] Path forward on profile guided inlining?
...e an estimated execution count for the call site. Both of the
inliner heuristics I'm interested in could be implemented using that
information combined with an up to date estimate of the function entry
count.
If we had the pass manager changes, the only thing we'd need to do is
update InlineFunction to subtract the estimated call count from the
entry count of the remaining callee definition. This would result in
the entry count of B reflecting the estimated entry count from the
remaining callers of B. (Given the call site count is an estimate, this
implies that entry counts are also now...
2013 Sep 15
0
[LLVMdev] Are instr_iterators invalidated when function inlining is performed?
...t; if ( CallInst* ci = dyn_cast<CallInst>(&*i) )
>> {
>> if ( ci->getCalledFunction() == klee_check_divF)
>> {
>> std::cout << "Trying to inline klee_div_zero_check" << std::endl;
>> InlineFunctionInfo IFI(0,0);
>> if (InlineFunction(ci,IFI))
>> {
>> std::cout << "Did inline" << std::endl; std::cout.flush();
>> }
>> else
>> std::cout << "Failed to in...
2011 Sep 02
0
[LLVMdev] Is it possible to inline Functions without using LLVM JIT Framework?
...er, in
> order to be inlined and then optimized onwards, I guess !!! (Correct me If I
> am Wrong at this)
I have a system where I need to do this quite often. In my inlining
pass I open the module containing the function I wish to inline, copy
the function into the current module, then call InlineFunction.
-Jeff
2015 Oct 12
3
[RFC] Clean up the way we store optional Function data
...aces
>>> where we need/want to add them after the fact?
>>
>> I think so. I see:
>>
>> LinkModules.cpp: Dst.setPrefixData(MapValue(Src.getPrefixData(), ValueMap,
>> BitcodeReader.cpp: FunctionPrologueWorklist.back().first->setPrologueData(C);
>> InlineFunction.cpp: Caller->setPersonalityFn(CalledPersonality);
>>
>> Some of these sites could be refactored so that the Functions are created with the prefix/prologue data they need. I don't think that's possible for personality functions (see my third example).
>>
>> Would...
2009 Nov 05
2
[LLVMdev] Debug Information for LLVM 2.6 and TOT
Devang Patel wrote:
> Hi John,
>
> On Wed, Nov 4, 2009 at 12:04 PM, John Criswell <criswell at uiuc.edu> wrote:
>
>> Dear All,
>>
>> 1) I recall reading somewhere that a few optimizations in LLVM 2.6 strip
>> away debug information when such information interferes with
>> optimization. Is this correct,
>>
>
> Yes.
>
>
2014 Sep 20
6
[LLVMdev] PHINode containing itself causes segfault when compiling Blender OpenCL kernel with R600 backend
...esults in the same problem with SIAnnotateControlFlow...
Besides "how to make a correct fix" :), my question also is: what are the
real semantics of a PHINode containing itself directly or indirectly? I've
done some tracing and saw such PHINodes added by the optimizer, in
llvm::InlineFunction()... but what do they mean and how to deal with them
correctly?
--
With best regards,
Vitaliy Filippov
2006 Mar 15
0
[LLVMdev] Inline hints for *compiler clients*
On Wed, 15 Mar 2006, Vikram S. Adve wrote:
>> Why can't the compiler pass just call InlineFunction(CallSite) on the
>> callsite it wants inlined? The only way that can fail is if LLVM cannot
>> ever inline the call (e.g. it uses varargs).
> In some cases, that would be fine. But in other cases:
> (1) It cannot "un-inline" any function that was previously inlined....
2006 Mar 15
4
[LLVMdev] Inline hints for *compiler clients*
On Mar 15, 2006, at 11:15 AM, Chris Lattner wrote:
> On Wed, 15 Mar 2006, Vikram S. Adve wrote:
>>> Why can't the compiler pass just call InlineFunction(CallSite) on
>>> the callsite it wants inlined? The only way that can fail is if
>>> LLVM cannot ever inline the call (e.g. it uses varargs).
>
>> In some cases, that would be fine. But in other cases:
>> (1) It cannot "un-inline" any function that w...