search for: mergefunc

Displaying 20 results from an estimated 23 matches for "mergefunc".

Did you mean: mergefuncs
2019 Feb 01
6
Status of the function merging pass?
...quark.org; Teresa Johnson; Duncan P. N. Exon Smith; Jessica Paquette Subject: Re: Status of the function merging pass? On Thu, Jan 31, 2019 at 8:52 PM Vedant Kumar <vsk at apple.com<mailto:vsk at apple.com>> wrote: Hi, I'm interested in finding ways to reduce code size. LLVM's MergeFunctions pass seems like a promising option, and I'm curious about its status in tree. Enabling MergeFunctions gives a 1% code size reduction across the entire iOS shared cache (a collection of a few hundred system-critical DSO's). The numbers are even more compelling for Swift code. In fact,...
2013 Dec 03
1
[LLVMdev] Failures on clang-mergefunc-x86_64-freeBSD9.2
Hi all, We have 4 outstanding tests on clang-mergefunc-x86_64-freeBSD9.2 builder. I have introduced issues for them in bugzilla: http://llvm.org/bugs/show_bug.cgi?id=18089 http://llvm.org/bugs/show_bug.cgi?id=18056 Since we have opened issues for these tests, can we add them to ignore-list for this builder? It allows faster catch and fix other failu...
2018 Aug 02
2
New and more general Function Merging optimization for code size
Hi Hal, Because my function merging strategy is able to merge any two function, allowing for different CFGs, different parameters, etc. I am unable to use just a simple hash value to compare whether or not two functions are similar. Therefore, the idea is to have an infrastructure which allows me to compare whether or not two functions are similar without having traverse the two function
2014 Oct 12
2
[LLVMdev] Debug Info and MergeFunctions Transform
...ebug information with this name. Though I'm not that familiar with Debug Info, perhaps there are still possible ways to provide single body with two debug infos. -Stepan 08.10.2014, 00:32, "Stepan Dyatkovskiy" <stpworld at narod.ru>: > Hi David, > Thanks for attention to MergeFunctions! I have read your mail briefly, > tomorrow I'll provide you with detailed information. By now you could > use tests from  $LLVM/test/Transforms/MergeFunc/ as examples. > > Cheers! > -Stepan > > David Blaikie wrote: >>  Hi Stepan, >> >>  After discover...
2010 Jul 04
2
[LLVMdev] list of LLVM optimization passes
...me this is known? Were these passes removed recently? A large number of passes mentioned in "opt -help" are not mentioned in [1]: -abcd -always-inline -functionattrs -insert-optimal-edge-profiling -instnamer -iv-users -lazy-value-info -lda -libcall-aa -live-values -mergefunc -partial-inliner -partialspecialization -pointertracking -print-dbginfo -print-dom-info -profile-estimator -profile-verifier -sccvn -scev-aa -simplify-libcalls-halfpowr -split-geps -ssi -ssi-everything -strip-debug-declare -strip-nondebug It's unclear to me which...
2011 Mar 07
0
[LLVMdev] matching function call arguments
...ing something like -earlycse before your pass? It might be overkill, but it'd probably get the job done. If you want a "lazy" check (as in, just for the values you want to compare) though, AFAIK there's no public interface for that kind of functionality. A pass like -earlycse or -mergefunc might have something you can factor out though. Other than that, you can probably hack up something with a recursive function using Instruction::isSameOperationAs(), which checks everything except operand values (so you'd need to check equivalence of operands recursively if you want to go more...
2014 Oct 07
2
[LLVMdev] Debug Info and MergeFunctions Transform
...and DeadArgumentElimination where llvm::Functions were replaced with similar functions (with the same name) to transform their type in some way, I started looking at all calls to llvm::Function::takeName to see if there were any other debug info quality bugs in similar callers. One such caller is MergeFunctions, and I don't see any debug info tests for this so I'm wondering what /should/ happen here. In the case where the functions are internal I'm not sure there's anything we can do, we simply remove one function and keep the other - the debug info can only be ascribed to one of the...
2014 Jan 22
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
On 2014 Jan 22, at 07:35, Stepan Dyatkovskiy <stpworld at narod.ru> wrote: > Hi Raul and Duncan, > > Duncan, > Thank you for review. I hope to present fixed patch tomorrow. > > First, I would like to show few performance results: > > command: "time opt -mergefunc <test>" > > File: tramp3d-v4.ll, 12963 functions > Current : Patched > Time: 9.8 s : 2.0 secs ; >400%!! > Functions merged: 3503 : 3507 > > File: spirit.ll, 2885 functions > Current : Patched > Time:...
2019 Jan 31
5
Status of the function merging pass?
Hi, I'm interested in finding ways to reduce code size. LLVM's MergeFunctions pass seems like a promising option, and I'm curious about its status in tree. Enabling MergeFunctions gives a 1% code size reduction across the entire iOS shared cache (a collection of a few hundred system-critical DSO's). The numbers are even more compelling for Swift code. In fact,...
2011 Mar 07
2
[LLVMdev] matching function call arguments
Hi Reid, Thank you for your response. In my analysis, I will always have entry(2) and exit(2). I will not run into cases involving entry (1+1) or entry (fn return values). I am having trouble trying to compare the arguments of entry and exit in the following scenario. #include<stdio.h> #include<stdlib.h> #include<pthread.h> struct sa { int a; pthread_mutex_t *mutex1;
2010 Jul 06
0
[LLVMdev] list of LLVM optimization passes
...me this is known? Were these passes removed recently? A large number of passes mentioned in "opt -help" are not mentioned in [1]: -abcd -always-inline -functionattrs -insert-optimal-edge-profiling -instnamer -iv-users -lazy-value-info -lda -libcall-aa -live-values -mergefunc -partial-inliner -partialspecialization -pointertracking -print-dbginfo -print-dom-info -profile-estimator -profile-verifier -sccvn -scev-aa -simplify-libcalls-halfpowr -split-geps -ssi -ssi-everything -strip-debug-declare -strip-nondebug It's unclear to me which...
2010 Jul 06
2
[LLVMdev] list of LLVM optimization passes
...rge number of passes mentioned in "opt -help" are not mentioned in [1]: > > -abcd > -always-inline > -functionattrs > -insert-optimal-edge-profiling > -instnamer > -iv-users > -lazy-value-info > -lda > -libcall-aa > -live-values > -mergefunc > -partial-inliner > -partialspecialization > -pointertracking > -print-dbginfo > -print-dom-info > -profile-estimator > -profile-verifier > -sccvn > -scev-aa > -simplify-libcalls-halfpowr > -split-geps > -ssi > -ssi-everything >...
2014 Feb 27
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...int cmpNumbers(uint64_t L, uint64_t R) { > + if (L < R) return -1; > + if (L > R) return 1; > + return 0; > +} > > At a high level, you don't actually need a <=> operator to use a sort. A > strict ordering ( < operator) is sufficient. (Note that for mergefunc, a > strict weak ordering is not sufficient, it must be a total ordering.) That could be done with int FunctionComparator::compare(). We can replace it with bool FunctionComparator::less(). Though for all other cmp methods need at least 2 bits of information as result: 1. Whether things are e...
2010 Jul 06
0
[LLVMdev] list of LLVM optimization passes
...rge number of passes mentioned in "opt -help" are not mentioned in [1]: > > -abcd > -always-inline > -functionattrs > -insert-optimal-edge-profiling > -instnamer > -iv-users > -lazy-value-info > -lda > -libcall-aa > -live-values > -mergefunc > -partial-inliner > -partialspecialization > -pointertracking > -print-dbginfo > -print-dom-info > -profile-estimator > -profile-verifier > -sccvn > -scev-aa > -simplify-libcalls-halfpowr > -split-geps > -ssi > -ssi-everything >...
2010 Jul 06
1
[LLVMdev] list of LLVM optimization passes
...p" are not mentioned in [1]: >> >> -abcd >> -always-inline >> -functionattrs >> -insert-optimal-edge-profiling >> -instnamer >> -iv-users >> -lazy-value-info >> -lda >> -libcall-aa >> -live-values >> -mergefunc >> -partial-inliner >> -partialspecialization >> -pointertracking >> -print-dbginfo >> -print-dom-info >> -profile-estimator >> -profile-verifier >> -sccvn >> -scev-aa >> -simplify-libcalls-halfpowr >> -split-ge...
2014 Jan 21
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...if (Res != 0) return Res; whereas, since you never use Res unless it's non-zero, I think the following is more clear and concise: if (int Res = cmpNumbers(I1->getNumOperands(), I2->getNumOperands())) return Res; - I'm not sure if your MERGEFUNC_SANITY should be included the way it is: +//#define MERGEFUNC_SANITY 900 +#ifdef MERGEFUNC_SANITY - I’m also unsure about the following: + // If we have some problematic functions, perhaps we would like + // to keep declarations only, and those definitions fires...
2010 Jul 24
0
[LLVMdev] [llvm-commits] turn on function merging
...different >> from i32. >> >> First of all, function merging is good because it produces smaller binaries. >> Doing it in the IR (say, instead of the linker) also saves us the compile >> time of emitting duplicate functions. When we can't remove a function >> mergefuncs leaves a tail-call stub and updates all callers to a canonical >> choice, improving the instruction cache hit rate. >> >> The bad side is that the process is inherently O(n^2). > Wait what? > Why? > > <I took a look at merge functions> > > 1. It's not...
2014 Feb 03
4
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi all, Previous patch has been split onto series of small changes. On each stage (after each patch) MergeFunctions pass is compilable and stable. Please find patches in attachment for review. To apply all patches at once, use "apply-patches.sh" script as follows: 0. Place "apply-patches.sh" in same directory with patches. 1. cd <llvm-sources-dir> 2. "bash <path-to-patch...
2017 Dec 13
5
RFC: Synthetic function entry counts
Functions in LLVM IR have a function_entry_count metadata that is attached in PGO compilation. By using the entry count together with the block frequency info, the compiler computes the profile count of call instructions based on which the hotness/coldness of callsites can be determined. Experiments have shown that using a higher threshold for hot callsites results in improved runtime performance
2014 Mar 13
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...1; > > + if (L > R) return 1; > > + return 0; > > +} > > > > At a high level, you don't actually need a <=> operator to use a > sort. A > > strict ordering ( < operator) is sufficient. (Note that for > mergefunc, a > > strict weak ordering is not sufficient, it must be a total ordering.) > That could be done with int FunctionComparator::compare(). We can > replace it with bool FunctionComparator::less(). Though for all > other cmp methods need at least 2 bits of information...