search for: mergefuncs

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

2019 Feb 01
6
Status of the function merging pass?
...ult for a while now, and have recently also enabled the use of aliases instead of thunks. Apart from some initial bugs we didn't encounter any significant issues (one minor issue with NVPTX not supporting aliases and having CC restrictions). As Rust tends to be quite heavy on monomorphization, MergeFuncs can give significant binary size reductions. I don't have any comprehensive numbers, but from checking this on a pet project just now, it reduces final artifact size by 13% and I've seen some similar numbers in the ~10% range quoted before. So, at least for Rust's use case this pass se...
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 failures (if we get them). I also wandering, may be
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
Hi David, After merging we always remove body of "G" (function we want to merge with "existing" one). In case with "writeThunk" we could add such info for "G", but it would be just a single string: reference to first string of "G". Ideal way here, is to merge debug information itself, and provide "F" with information for "G"
2010 Jul 04
2
[LLVMdev] list of LLVM optimization passes
Hello LLVMers, I'm putting together some (extensive) experiments with using a genetic algorithm to construct sets of optimization passes that are as close as optimal in a number of ways, e.g. compilation time, execution time, code size, ... I've figured out which LLVM tools I should use for this (llvm-gcc to obtain bitcode, opt to optimize, llc to obtain assembly, ...), and I'm now
2011 Mar 07
0
[LLVMdev] matching function call arguments
On Mon, Mar 7, 2011 at 8:03 PM, Hari Pyla <harip at vt.edu> wrote: >  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> >
2014 Oct 07
2
[LLVMdev] Debug Info and MergeFunctions Transform
Hi Stepan, After discovering several bugs in ArgumentPromotion 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
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
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, the swift compiler
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
Dear Kenneth, May I ask you if you are implementing your search within ctuning framework: ctuning.org/ctuning-cc? The thing is that I use it since some time for my thesis to optimize code size and compilation time and run time with GCC though they are not using genetic algorithms but some slower hybrid of random exploration and than AI with some fronteer detection. Since recent version can be
2010 Jul 06
2
[LLVMdev] list of LLVM optimization passes
On Jul 6, 2010, at 10:09 AM, Manuel Llosa wrote: > Dear Kenneth, May I ask you if you are implementing your search within > ctuning framework: ctuning.org/ctuning-cc? No, I'm not. I've built my own framework, and since I don't have any experience with the ctuning framework, I don't intend to start using that. There's little gain in it for me. > The thing is that I
2014 Feb 27
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi Nick, I tried to rework changes as you requested. One of patches (0004 with extra assertions) has been removed. > + bool isEquivalentType(Type *Ty1, Type *Ty2) const { > + return cmpType(Ty1, Ty2) == 0; > + } > > Why do we still need isEquivalentType? Can we nuke this? Yup. After applying all the patches isEquivalentType will be totally replaced with cmpType. All
2010 Jul 06
0
[LLVMdev] list of LLVM optimization passes
Dear Kenneth, I see. Do you plan sharing your framework in open source? For now, I will continue using ctuning tools (they support LLVM as is but not some specific things on JIT dynamic recompilation what is my thesis about). I will like to compare all tools of course and will be happy to share results although real not until autumn).Look forward to your results and hopefully keep in touch.
2010 Jul 06
1
[LLVMdev] list of LLVM optimization passes
On Jul 6, 2010, at 5:04 PM, Manuel Llosa wrote: > Dear Kenneth, I see. Do you plan sharing your framework in open source? > For now, I will continue using ctuning tools (they support LLVM as is but not > some specific things on JIT dynamic recompilation what is my thesis about). > I will like to compare all tools of course and will be happy > to share results although real not
2014 Jan 21
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi Stepan, This looks interesting! Some high-level comments: - Please post the patch untarred next time. Also, I'm not sure if it's typical to provide supporting documents in .doc format; while many of us probably have access to Word, a more portable and email-friendly format (like text, markdown or rst) is probably better. - Have you profiled this? What's the speedup? I
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 r...
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
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))
Hi Nick, I have committed 0001 as r203788. I'm working on fixes for 0002 - 0014. > After reading through this patch series, I feel like I'm missing > something important. Where's the sort function? It looks like we're > still comparing all functions to all other functions. When you insert functions into std::set or its analogs it does all the job for you. Since