Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-26 Thread Johannes Weiß via swift-dev
👍 > On 26 Jul 2017, at 4:28 pm, Erik Eckstein wrote: > > As John said, this is out of scope for swift 4. > I think it’s find to just have it in master. > > Thanks again for your work! > >> On Jul 25, 2017, at 10:00 AM, John McCall via swift-dev >> wrote: >> >> >>> On Jul 25, 2017, at 12:55

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-26 Thread Michael Gottesman via swift-dev
+1! > On Jul 26, 2017, at 8:29 AM, Erik Eckstein via swift-dev > wrote: > > As John said, this is out of scope for swift 4. > I think it’s find to just have it in master. > > Thanks again for your work! > >> On Jul 25, 2017, at 10:00 AM, John McCall via swift-dev >> wrote: >> >> >>> On Ju

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-26 Thread Erik Eckstein via swift-dev
As John said, this is out of scope for swift 4. I think it’s find to just have it in master. Thanks again for your work! > On Jul 25, 2017, at 10:00 AM, John McCall via swift-dev > wrote: > > >> On Jul 25, 2017, at 12:55 PM, Johannes Weiß via swift-dev >> wrote: >> >> Thanks very much Eric

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-25 Thread John McCall via swift-dev
> On Jul 25, 2017, at 12:55 PM, Johannes Weiß via swift-dev > wrote: > > Thanks very much Eric & Michael for your help! And thanks for merging it. > Will this automatically be part of Swift 4 or do I need to make another PR > against a swift 4 branch? It's very hard to imagine we would take

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-25 Thread Johannes Weiß via swift-dev
Thanks very much Eric & Michael for your help! And thanks for merging it. Will this automatically be part of Swift 4 or do I need to make another PR against a swift 4 branch? Thanks, Johannes > On 18 Jul 2017, at 9:21 pm, Johannes Weiß via swift-dev > wrote: > > great, thank you. I think

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-18 Thread Johannes Weiß via swift-dev
great, thank you. I think I have worked all the suggestions in, let's do the rest in this PR: https://github.com/apple/swift/pull/11040 It's getting late here so I'll probably to the test tomorrow (but marked the patch as 'do not merge' & added that a test is still missing). > On 18 Jul 2017, a

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-18 Thread Erik Eckstein via swift-dev
> On Jul 18, 2017, at 10:40 AM, Johannes Weiß wrote: > > Thanks, both suggestions look great. Will work them in tomorrow and will also > try to add a test for the whole thing. > >> On 18 Jul 2017, at 5:53 pm, Michael Gottesman wrote: >> >>> >>> On Jul 18, 2017, at 8:39 AM, Johannes Weiß wr

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-18 Thread Johannes Weiß via swift-dev
Thanks, both suggestions look great. Will work them in tomorrow and will also try to add a test for the whole thing. > On 18 Jul 2017, at 5:53 pm, Michael Gottesman wrote: > >> >> On Jul 18, 2017, at 8:39 AM, Johannes Weiß wrote: >> >> Hi Erik, >> >>> On 17 Jul 2017, at 10:26 pm, Erik Eckst

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-18 Thread Michael Gottesman via swift-dev
> On Jul 18, 2017, at 9:53 AM, Michael Gottesman via swift-dev > wrote: > >> >> On Jul 18, 2017, at 8:39 AM, Johannes Weiß wrote: >> >> Hi Erik, >> >>> On 17 Jul 2017, at 10:26 pm, Erik Eckstein wrote: >>> >>> Hi Johannes, >>> >>> great that you want to work on this! >> >> Thanks for yo

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-18 Thread Michael Gottesman via swift-dev
> On Jul 18, 2017, at 8:39 AM, Johannes Weiß wrote: > > Hi Erik, > >> On 17 Jul 2017, at 10:26 pm, Erik Eckstein wrote: >> >> Hi Johannes, >> >> great that you want to work on this! > > Thanks for your help, without Michael's and your help I wouldn't have been > able to do anything here re

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-18 Thread Johannes Weiß via swift-dev
Hi Erik, > On 17 Jul 2017, at 10:26 pm, Erik Eckstein wrote: > > Hi Johannes, > > great that you want to work on this! Thanks for your help, without Michael's and your help I wouldn't have been able to do anything here really! > Some ideas: > SideEffectAnalysis currently does not have a not

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-17 Thread Erik Eckstein via swift-dev
Hi Johannes, great that you want to work on this! Some ideas: SideEffectAnalysis currently does not have a notion of “this argument is not modified by the callee” if the callee is unknown or does anything non-trivial. Therefore I think it’s best to put the in_guarantee check directly into Memor

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-17 Thread Johannes Weiß via swift-dev
Thanks Michael! Erik, I hope what I wrote makes some sense. Any questions or suggestions, please let me know. > On 14 Jul 2017, at 7:30 pm, Michael Gottesman wrote: > >> >> On Jul 12, 2017, at 9:53 AM, Johannes Weiß wrote: >> >> Hi Michael, >> >> >>> [...] Long story short, I think t

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-14 Thread Michael Gottesman via swift-dev
> On Jul 12, 2017, at 9:53 AM, Johannes Weiß wrote: > > Hi Michael, > > >> [...] >>> Long story short, I think the RLE actually works for the test case I >>> created. It's even clever enough to see through my invalid function bad() >>> which modified the storage despite its claim that it doe

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-12 Thread Johannes Weiß via swift-dev
Hi Michael, > [...] >> Long story short, I think the RLE actually works for the test case I >> created. It's even clever enough to see through my invalid function bad() >> which modified the storage despite its claim that it doesn't. I might also >> be misunderstanding something. > > When som

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-12 Thread Michael Gottesman via swift-dev
> On Jul 11, 2017, at 4:21 PM, Michael Gottesman via swift-dev > wrote: > >> >> On Jul 11, 2017, at 10:16 AM, Johannes Weiß > > wrote: >> >> Hi Michael, >> >>> [...] Now you advise to run the '-debug-only=sil-redundant-load-elim' so I tried sil

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-11 Thread Michael Gottesman via swift-dev
> On Jul 11, 2017, at 10:16 AM, Johannes Weiß wrote: > > Hi Michael, > >> [...] >>> Now you advise to run the '-debug-only=sil-redundant-load-elim' so I tried >>> >>> sil-opt [...] -debug-only=sil-redundant-load-elim >>> >>> but it doesn't seem happy with that. Did I misunderstand how to pass

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-11 Thread Johannes Weiß via swift-dev
Hi Michael, > [...] >> Now you advise to run the '-debug-only=sil-redundant-load-elim' so I tried >> >> sil-opt [...] -debug-only=sil-redundant-load-elim >> >> but it doesn't seem happy with that. Did I misunderstand how to pass this >> option? > > What do you mean by it doesn't seem happy?

Re: [swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-10 Thread Michael Gottesman via swift-dev
> On Jul 10, 2017, at 10:56 AM, Johannes Weiß wrote: > > Hi Michael, > > Firstly: if swift-dev is not the right place for me to ask silly questions, > please let me know :). > > Thanks very much for all your pointers on the JIRA [1] ticket. I was just > trying to get started and already have

[swift-dev] SR-5403 / Memory Optimization Opportunity (Load/Store forwarding)

2017-07-10 Thread Johannes Weiß via swift-dev
Hi Michael, Firstly: if swift-dev is not the right place for me to ask silly questions, please let me know :). Thanks very much for all your pointers on the JIRA [1] ticket. I was just trying to get started and already have a few questions. Apologies, they're very basic as I'm just getting sta