search for: outlining

Displaying 20 results from an estimated 2809 matches for "outlining".

2017 Sep 05
5
[RFC] PT.2 Add IR level interprocedural outliner for code size.
...- I have tested the IR outliner and current Machine outliner on a wide variety of benchmarks. The results include total % reduction of both geomean and total size. It also includes individual results for each test in each respective benchmark. The configurations tested are: · Early+Late IR outlining · Late IR outlining · Machine outlining · Early+Late+Machine outlining · Late+Machine outlining NOTE: For fairness in comparisons with the Machine Outliner, all IR outliner runs also include (-mno-red-zone, outlining from linkonce_odr/weak_odr functions). The code size...
2017 Sep 22
0
[RFC] PT.2 Add IR level interprocedural outliner for code size.
...the IR outliner and current Machine outliner on a wide variety of benchmarks. The results include total % reduction of both geomean and total size. It also includes individual results for each test in each respective benchmark. > > The configurations tested are: > · Early+Late IR outlining > · Late IR outlining > · Machine outlining > · Early+Late+Machine outlining > · Late+Machine outlining > > NOTE: For fairness in comparisons with the Machine Outliner, all IR outliner runs also include (-mno-red-zone, outlining from linkonce_odr/weak_odr...
2017 Sep 22
2
[RFC] PT.2 Add IR level interprocedural outliner for code size.
...would love to see an outliner at the IR level also. But > rather than a comparison vs. the machine outliner I would like to learn > more about how the core data structures between the outliners will be > shared. > The only structure that needs to be shared is a struct defining what an outlining candidate looks like. > In particular for matching/pruning it seems to be a reasonable approach. > When I get around to posting the real patches there are two utility functions that allow for finding candidates and pruning a candidate list. The only thing necessary to use these utilities i...
2017 Sep 27
0
[RFC] PT.2 Add IR level interprocedural outliner for code size.
...general I would love to see an outliner at the IR level also. But rather than a comparison vs. the machine outliner I would like to learn more about how the core data structures between the outliners will be shared. > > The only structure that needs to be shared is a struct defining what an outlining candidate looks like. > > In particular for matching/pruning it seems to be a reasonable approach. > > When I get around to posting the real patches there are two utility functions that allow for finding candidates and pruning a candidate list. The only thing necessary to use these...
2013 Jul 16
1
Masking oceans using polypath
Hi R-help I am trying to mask the ocean from an image plot I have made. Here is some example code: library(mapdata) image(x=110:155, y =-40:-10, z = outer(1:45, 1:30, "+"), xlab = "lon", ylab = "lat") outline <- map("worldHires", plot=FALSE) # returns a list of x/y coords xrange <- range(outline$x, na.rm=TRUE) # get bounding box yrange
2017 Aug 15
8
[RFC] Enhance Partial Inliner by using a general outlining scheme for cold blocks
...ode, and not used to determine whether to outline the slow code. ### Proposed changes In addition to looking for early returns, we should utilize profile information to outline blocks that are considered cold. If we can sufficiently reduce the size of the original function via this type of outlining, inlining should be able to inline the rest of the hot code. ## Details With the presence of profile information, we have a view of what code is infrequently executed and make better decisions on what to outline. Early return blocks that are infrequently executed should still be included as...
2017 Aug 15
3
[RFC] Enhance Partial Inliner by using a general outlining scheme for cold blocks
Hi Jessica, Thanks for the feedback. I believe the existing partial inliner pass does use some common utilities like the code extractor to do outlining. Is that what you're referring to? I don't recall seeing any other passes that has outlining other than the machine outliner, but I may have missed something. I briefly looked at River's RFC and it seems he's mainly utilizing outlining as a tool to reduce code size while maintaini...
2017 Sep 27
3
[RFC] PT.2 Add IR level interprocedural outliner for code size.
...a list of repeated sequences. The MachineOutliner currently has an “InstructionMapper” struct in it. I think we can probably build on that struct so that we can choose different mapping schemes. (3) Cost model/candidate selection scheme Every outliner should implement a function that returns the outlining cost or benefit of a candidate. In the MachineOutliner, this is a joint effort between the pass and the target. (4) Outlining scheme Every outliner should implement a function that actually performs outlining. That is, we should have a function that replaces each instance of a repeated sequence o...
2018 Apr 21
5
[RFC] Turn the MachineOutliner on by default in AArch64 under -Oz
...turn it on by default in AArch64 under -Oz. Since the primary goal of -Oz is "make it as small as possible", the outliner is a good addition to the -Oz pass pipeline. For a detailed description of the MachineOutliner, see the original RFC. [2]. We've observed, comparing -Oz to -Oz + outlining on the latest trunk compiler, * A geomean ~4.4% text size reduction of the CTMark tests (min = 0.3% on tramp3d-v4, max = 15.4% on kc) * A geomean compile-time overhead of ~1.1% (min = 0.2% on 7zip, max = 2.2% on sqlite3) We perform regular testing to ensure the outliner produces correct AArch64...
2017 Jul 31
2
[RFC] Add IR level interprocedural outliner for code size.
...was Jessica's proposal of a pipeline of: 1. IR outline 2. Inline 3. MIR outline In your response to that proposal you dismissed it out of hand with "feelings" but not data. Given that the proposal came from Jessica (a community member with significant relevant experience in outlining), and it was also recognized as interesting by Eric Christopher (a long-time member of the community with wide reaching expertise), I think dismissing it may have been a little premature. I dismissed the idea of an outliner at the machine level being able to catch bad inlining decisions. Given the...
2017 Aug 24
1
[RFC] Enhance Partial Inliner by using a general outlining scheme for cold blocks
Hi David, So I've began doing some implementation on the outlining portion of the code. Currently, I got the partial inliner to outline cold regions (single entry, single exit) of the code, based solely on the existence of ProfileSummaryInfo (ie. profiling data). However, I have some concerns on how this will co-exist with the existing code that peels early retu...
2017 Aug 24
3
[RFC] Enhance Partial Inliner by using a general outlining scheme for cold blocks
Hi David, The only reason I can see to use the 'pattern matching' part as a fall-back is in case we cannot inline the (what I'm assuming would be) a much bigger hot-path-only cloned function for whatever reason. What I'm assuming here is that after cold-region outlining, we may still have a large portion of the original function body to attempt to inline, whereas the pattern matching method will only contain a few basic blocks, giving a better chance to inline something. For your (2) point, I think we'll have to be careful here. Without a sense of how 'l...
2017 Aug 29
3
[RFC] Enhance Partial Inliner by using a general outlining scheme for cold blocks
...;> The only reason I can see to use the 'pattern matching' part as a >> fall-back is in case we cannot inline the (what I'm assuming would be) a >> much bigger hot-path-only cloned function for whatever reason. What I'm >> assuming here is that after cold-region outlining, we may still have a >> large portion of the original function body to attempt to inline, whereas >> the pattern matching method will only contain a few basic blocks, giving a >> better chance to inline something. >> > > With profile data, the overhead of outlining a c...
2017 Aug 15
2
[RFC] Enhance Partial Inliner by using a general outlining scheme for cold blocks
...l road blocks that prevented it from really going anywhere( like > the inliner not preserving pgo data) but those problems should be gone by > now. > Some thoughts: > > : In terms of cost modeling, you will want to consider the interaction > with loops: > - Whats the impact of outlining from inside of a loop. > - What if the hot region does not include the entry/exit, i.e hot loop. > > : Something that would also benefit, but would require more tuning, is the > relationship between size and "hotness". If for example you have a function > that looks like t...
2017 Jul 29
7
[RFC] Add IR level interprocedural outliner for code size.
...ited in this thread was Jessica's proposal of a pipeline of: IR outline Inline MIR outline In your response to that proposal you dismissed it out of hand with "feelings" but not data. Given that the proposal came from Jessica (a community member with significant relevant experience in outlining), and it was also recognized as interesting by Eric Christopher (a long-time member of the community with wide reaching expertise), I think dismissing it may have been a little premature. I also want to visit a few procedural notes. Mehdi commented on the thread that it wouldn't be fair to as...
2017 Jul 26
2
[RFC] Add IR level interprocedural outliner for code size.
Hi, On Wed, Jul 26, 2017 at 12:54 PM, Sean Silva <chisophugis at gmail.com> wrote: > The way I interpret Quentin's statement is something like: > > - Inlining turns an interprocedural problem into an intraprocedural problem > - Outlining turns an intraprocedural problem into an interprocedural problem > > Insofar as our intraprocedural analyses and transformations are strictly > more powerful than interprocedural, then there is a precise sense in which > inlining exposes optimization opportunities while outlining does n...
2017 Jul 21
2
[RFC] Add IR level interprocedural outliner for code size.
...y algorithm for candidate pruning. - Currently supports X86, AArch64 targets. - Requires NoRedZone on supported targets. IR Outliner: - Builds a suffix array based upon relaxed equivalence between ir instrs. - Allows for inputs/outputs from an outlined function. - Complex verification of outlining candidates due to above two points(relaxed equivalency, inputs/outputs). - Tunable generic target independent cost model (estimates constant folded inputs, output condensing, etc.). - Note it uses the target info available (TargetTransformInfo) - Uses a greedy interval based algorithm fo...
2017 Jul 26
3
[RFC] Add IR level interprocedural outliner for code size.
...m.org> wrote: > No, I mean in terms of enabling other optimizations in the pipeline like > vectorizer. Outliner does not expose any of that. I have not made a lot of effort to understand the full discussion here (so what I say below may be off-base), but I think there are some cases where outlining (especially working with function-attrs) can make optimization easier. It can help transforms that duplicate code (like loop unrolling and inlining) be more profitable -- I'm thinking of cases where unrolling/inlining would have to duplicate a lot of code, but after outlining would require dup...
2017 Aug 01
4
[RFC] Add IR level interprocedural outliner for code size.
...and adding $0.02 to the "IR outline + inline + MIR outline" idea, my gut feeling (yes, only a "feeling" -- and one coming from my gut, not head!) is that inlining correcting wrong IR outlining decisions with MIR outlining correcting wrong inlining decisions is absolutely unrealistic and a heuristics nightmare at best. Inliner's heuristics are already complex enough and not 100% bulletproof; if we add IR outliner heuristics to the mix -- and then just a little bit of MIR outliner heu...
2017 Jul 20
8
[RFC] Add IR level interprocedural outliner for code size.
I’m River and I’m a compiler engineer at PlayStation. Recently, I’ve been working on an interprocedural outlining (code folding) pass for code size improvement at the IR level. We hit a couple of use cases that the current code size solutions didn’t handle well enough. Outlining is one of the avenues that seemed potentially beneficial. -- Algorithmic Approach -- The general implementation can be explained in...