search for: alwaysinliner

Displaying 20 results from an estimated 125 matches for "alwaysinliner".

Did you mean: alwaysinline
2015 Aug 21
4
[RFC] AlwaysInline codegen
...of functions in the headers marked this way and does _not_ export them from libc++.so. Current implementation in clang emits alwaysinline+inline functions as available_externally definitions. The inliner is an SCC pass, and as such it does not process unreachable functions at all. This means that AlwaysInliner may leave some alwaysinline functions not inlined. If such function has an available_externally linkage, it is not emitted into the binary, and all calls to it are emitted as undefined symbol references. Some time ago I've made an attempt to add a DCE pass before the AlwaysInliner pass to fix...
2015 Aug 21
2
[cfe-dev] [RFC] AlwaysInline codegen
...does _not_ export them from libc++.so. > > > > Current implementation in clang emits alwaysinline+inline functions as > > available_externally definitions. The inliner is an SCC pass, and as > > such it does not process unreachable functions at all. This means that > > AlwaysInliner may leave some alwaysinline functions not inlined. If > > such function has an available_externally linkage, it is not emitted > > into the binary, and all calls to it are emitted as undefined symbol > > references. > > > > Some time ago I've made an attempt to add...
2017 Nov 17
2
Ensuring that dead allocations from a custom allocator are killed by LLVM
Hello all, I have a custom allocator, and would like to teach LLVM about its semantics. In particular, I would like LLVM to kill allocations that are "dead", similar to dead new in C++. Consider this example: ; ModuleID = '<stdin>' source_filename = "Module" ; Function Attrs: inaccessiblememonly noinline norecurse nounwind declare i8* @alloc(i64)
2017 Jun 24
1
musttail & alwaysinline interaction
Consider this program: @globalSideEffect = global i32 0 define void @tobeinlined() #0 { entry: store i32 3, i32* @globalSideEffect, align 4 musttail call fastcc void @tailcallee(i32 3) ret void } define fastcc void @tailcallee(i32 %i) { entry: call void @tobeinlined() ret void } attributes #0 = { alwaysinline } Clearly, if this is processed with opt -alwaysinline, it will lead
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hi Duncan, thanks for the quick answer. Yes I'm sure the runOnModule is being called, and when I dump the functions before exiting the method I can see the AlwaysInline attribute. I'll check InlineAlways.cpp and will reimplement as last resource but I still wonder why this is not working. On Mon, Nov 5, 2012 at 5:03 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Arnaldo,
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hello everyone, I am coding a ModulePass in which I want to add an AlwaysInline attribute to every function so that they can be later inlined by the -always-inline pass. However, the changes to the function seem to be lost after exiting my pass because the AlwaysInline attribute is not in the output LLVM IR. Maybe the function iterator passed by the module object actually points to copies of
2013 Mar 15
0
[LLVMdev] Scheduling a custom pass to run after AlwaysInliner
Hi. I want to schedule my custom pass to run after all inlining is done, specifically i want to go after AlwaysInliner pass. But that doesn't seem to work "AU.addRequired<AlwaysInliner>();", where AU is an object AnalysisUsage AlwaysInliner seems to be in anonymous namespace in cpp file, so i can't reference it. Is there a simple way to do that? -- With best regards, Dmitry ------------...
2010 Jan 08
4
[LLVMdev] Inlining
On 01/08/2010 02:10 PM, John McCall wrote: > 'llc' is an IR-to-assembly compiler; at -O3 it does some pretty neat > machine-code and object-file optimizations, but it does not apply > high-level optimizations like CSE or inlining. 'opt' is the tool > which does IR-to-IR optimization. A vital clue, but I'm still not getting it: --- gemini:~/Projects/Nil/nil(0)$
2015 Jan 05
2
[LLVMdev] should AlwaysInliner inline this case?
hi, Pete, I understand InstCombine may simplify bitcast to nothing, but the order matters. AlwaysInliner happens in very early stage, and we never call it again. if InstCombine works, can we invoke it before Inliner? thanks, --lx On Mon, Jan 5, 2015 at 5:40 PM, Pete Cooper <peter_cooper at apple.com> wrote: > Hi lx, Philip > > I've seen an instcombine which helps with this situa...
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo, On 05/11/12 10:02, Arnaldo wrote: > Hi Duncan, thanks for the quick answer. > > Yes I'm sure the runOnModule is being called, and when I dump the functions > before exiting the method I can see the AlwaysInline attribute. > > I'll check InlineAlways.cpp and will reimplement as last resource but I still > wonder why this is not working. if you want more
2012 Nov 21
1
[LLVMdev] [RFC] Passing Options to Different Parts of the Compiler Using Attributes
On Tue, Nov 20, 2012 at 11:03 AM, Meador Inge <meadori at codesourcery.com> wrote: > > On Nov 13, 2012, at 12:20 AM, Bill Wendling wrote: > >> IR Changes >> ---------- >> >> The attributes will be specified within the IR. This allows us to generate code >> that the user wants. This also has the advantage that it will no longer be >> necessary to
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo, > I am coding a ModulePass in which I want to add an AlwaysInline attribute to > every function so that they can be later inlined by the -always-inline pass. why not just do the inlining yourself. The always inliner code is at lib/Transforms/IPO/InlineAlways.cpp, and it's pretty short. > However, the changes to the function seem to be lost after exiting my pass >
2010 Jan 09
0
[LLVMdev] Inlining
Dustin Laurence wrote: > On 01/08/2010 02:10 PM, John McCall wrote: > > >> 'llc' is an IR-to-assembly compiler; at -O3 it does some pretty neat >> machine-code and object-file optimizations, but it does not apply >> high-level optimizations like CSE or inlining. 'opt' is the tool >> which does IR-to-IR optimization. >> > > A
2013 Jun 17
2
[LLVMdev] [cfe-dev] [RFC] add Function Attribute to disable optimization
Dropping opt level should not lead to ABI changes. Otherwise you won't be able to mix-match O2 and O0 objects either. David On Mon, Jun 17, 2013 at 10:59 AM, jahanian <fjahanian at apple.com> wrote: > Wouldn’t implementing this proposal be a red herring? By this I mean, it is > possible that > throughout the optimization phases, there is an implied assumption that all >
2010 Jan 08
4
[LLVMdev] Inlining
OK, I wanted to understand function inlining in LLVM but had avoided going to the effort of finding out if the inlining was really happening. The advice I got to "use the assembly source, Luke" suggested I go ahead and investigate inlining for a bit of practice, since (so I figured) even a monkey with really weak x86-fu could tell whether a function call was happening or not. If this
2009 Jul 14
3
[LLVMdev] Unexpected failures in the DejaGNU test collection
Hi all, When using "make check" with the DejaGNU test collection, I encounter two unexpected failures (they seem to be closely related). My question: are they well known, and if so what's the problem and how can I fix it? This is the error text I get: FAIL: /var/data/common/trunk/llvm/test/FrontendC/2008-05-19-AlwaysInline.c Failed with exit(1) at line 1 while running:
2013 Dec 01
2
[LLVMdev] x86: inline an LLVM IR function?
Sorry for what may possibly be a rather stupid question, but how on earth do you make LLC inline a function? I've got this code: attributes 0 = { alwaysinline nounwind } define internal i32 @lambda(i32 %a, i32 %x) #0 { %1 = add i32 %a, %x ret i32 %1 } define i32 @foo(i32 %a) nounwind { %1 = call i32 @lambda(i32 %a, i32 10) ret i32 %1 } And no matter
2010 Jan 09
2
[LLVMdev] Inlining
On 01/08/2010 09:17 PM, Nick Lewycky wrote: > Try using 'internal' linkage instead of 'linkonce'. That did it, thanks. --- gemini:~/Projects/LLVM/Tests/Inline(0)$ cat testInline.optdis.ll ; ModuleID = 'testInline.optbc' define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readnone { ret i32 42 } gemini:~/Projects/LLVM/Tests/Inline(0)$ --- > If you're
2013 Jun 17
0
[LLVMdev] [RFC] add Function Attribute to disable optimization
Andrea_DiBiagio at sn.scee.net wrote: > Hi, > > I previously made a proposal for adding a pragma for per-function > optimization level control due to a number of requests from our customers > (See http://comments.gmane.org/gmane.comp.compilers.clang.devel/28958 for > the previous discussion), however the discussion was inconclusive. Some > of my colleagues recently had the
2018 Feb 16
3
Missing attribute inference cases
This email is just to summarize a bit of digging I did last night into our attribute inference.  Unfortunately, I'm not going to have time to implement any of the gaps I noticed, but I figured someone else out there might be interested. *Missing Attributes* argmemonly - influences AA, particularly relevant for libraries which wrap build in functions which are annotated, but don't