search for: mergefunctions

Displaying 20 results from an estimated 34 matches for "mergefunctions".

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 s...
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 two...
2014 Jan 17
6
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi all, I propose simple improvement for MergeFunctions pass, that reduced its complexity from O(N^2) to O(log(N)), where N is number of functions in module. The idea, is to replace the result of comparison from "bool" to "-1,0,1". In another words: define order relation on functions set. To be sure, that functions could be compa...
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 discovering s...
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, the s...
2014 Jan 22
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...ll try look at it in nearest time and perhaps its not the best solution I gave in this post. -Stepan 22.01.2014, 20:53, "Tobias von Koch" <tobias.von.koch at gmail.com>: > Hi Stepan, > > As you've seen we have recently implemented a significant enhancement to > the MergeFunctions pass that also allows merging of functions that are > only similar but not identical > (http://llvm-reviews.chandlerc.com/D2591). > > Our patch also changes the way that functions are compared quite > significantly. This is necessary because we need to compare all > functions in a...
2013 Oct 27
2
[LLVMdev] Two questions about MergeFunctions pass
Hi Nick. Can you help me sort some things out in MergeFucntions pass. While I was working on MergeFunctions pass I got several questions. I hardly tried to find all the answers by myself, but there are still two questions without answer. It is about merging functions itself (not comparing). First question is: Why sometimes we use RAUW and sometimes replaceDirectCallers. Would you help me with explan...
2013 Oct 29
0
[LLVMdev] Two questions about MergeFunctions pass
On 27 October 2013 11:30, Stepan Dyatkovskiy <stpworld at narod.ru> wrote: > Hi Nick. > > Can you help me sort some things out in MergeFucntions pass. While I was > working on MergeFunctions pass I got several questions. I hardly tried to > find all the answers by myself, but there are still two questions without > answer. > > It is about merging functions itself (not comparing). > > First question is: > Why sometimes we use RAUW and sometimes replaceDirectCallers....
2014 Jan 31
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...ilto:tobias.von.koch at gmail.com> > <mailto:tobias.von.koch at gmail.__com > <mailto:tobias.von.koch at gmail.com>>> wrote: > > Hi Stepan, > > Sorry for the delay. It's great that you are working on > MergeFunctions as well and I agree, we should definitely try to > combine our efforts to improve MergeFunctions. > > Just to give you some context, the pass (with the similar > function > merging patch) is already being used in a production >...
2020 Mar 18
2
[GSoC '20 Project Interest] - Improve MergeFunctions to incorporate MergeSimilarFunction patches and ThinLTO Support
Hello, I'm Ruijie Fang, currently a 1st-year undergraduate at Princeton University, majoring in Computer Science. I am writing to to express my interest in the Google Summer of Code project: Improve MergeFunctions to incorporate MergeSimilarFunction patches and ThinLTO Support. I've read the LCTES'14 paper and found it quite interesting and comprehensible. I've also went as far as starting to read the source code for the stack of patches listed on the LLVM GSoC website. I'm wondering if anyo...
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-patches-di...
2014 Jan 21
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...+ Function *F = I; + F->deleteBody(); + } +#endif Cheers, Duncan On Jan 21, 2014, at 9:58 AM, Stepan Dyatkovskiy <stpworld at narod.ru> wrote: > ping > Stepan Dyatkovskiy wrote: >> Hi all, >> >> I propose simple improvement for MergeFunctions pass, that reduced its >> complexity from O(N^2) to O(log(N)), where N is number of functions in >> module. >> >> The idea, is to replace the result of comparison from "bool" to >> "-1,0,1". In another words: define order relation on functions set....
2014 Jan 29
3
[LLVMdev] making emitInlineAsm protected
On 01/29/2014 03:39 PM, Rafael Espíndola wrote: >> So explain to me how this mechanism would work. >> >> As I'm processing a single mips16 function, I realize that I need to create >> one or more mips32 helper functions. >> >> I'm in a function pass. So I'm not supposed to be creating new functions, as >> far as I understand. >> >>
2014 Jan 30
2
[LLVMdev] making emitInlineAsm protected
On 01/29/2014 04:25 PM, Rafael Espíndola wrote: >> How would this pass get added to the chain? >> >> It has to create more functions and then those in turn need to be compiled. > I am sure it can be done. MergeFunctions for example creates new functions. > > Now, it does seem this request/code review is a bit upside down. You > have been told that your original proposal is not acceptable. > Reviewers may offer to help, but in the end it is the author that has > to go figure out how something has to...
2014 Feb 27
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...to 0008.) > > Nick > > > On 3 February 2014 11:11, Stepan Dyatkovskiy <stpworld at narod.ru > <mailto:stpworld at narod.ru>> wrote: > > 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-...
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > Personally, I think the right approach is to add a bool to > createGlobalDCEPass defaulting to true named something like > IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after > inlining for obvious reasons, so the default makes sense. The special case > is
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...============================================================== --- include/llvm/Transforms/IPO/PassManagerBuilder.h (revision 237590) +++ include/llvm/Transforms/IPO/PassManagerBuilder.h (working copy) @@ -121,6 +121,7 @@ class PassManagerBuilder { bool VerifyInput; bool VerifyOutput; bool MergeFunctions; + bool LTO; private: /// ExtensionList - This is list of all of the extensions that are registered. Index: lib/Transforms/IPO/CMakeLists.txt =================================================================== --- lib/Transforms/IPO/CMakeLists.txt (revision 237590) +++ lib/Transforms/IPO/CMa...
2015 Jun 05
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Jun 4, 2015 at 5:17 PM, Teresa Johnson <tejohnson at google.com> wrote: >> >> Agreed. Although I assume you mean invoke the new pass under a >> ThinLTO-only option so that avail extern are not dropped in the >> compile pass before the LTO link? > > > No, this pass
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
2011 Apr 05
1
[LLVMdev] [GSoC] Optimizing for size
...size optimization. After working on existing passes, I would add a new MergeBlocks pass. This is an IPO pass that would combine equivalent basic blocks, extracting them into new functions. Research has shown that this can decrease code size by 5-6%. The new pass will be based on CodeExtractor and MergeFunctions; it will create a hash table of every basic block, based on the number of instructions of different types, and then perform a detailed comparison on blocks with the same hash. I would first write an inefficient preliminary version that only finds obvious cases. This can be used to get an impression...