Post B47QxwWwwhqP8LITEe by wim_v12e@merveilles.town
 (DIR) More posts by wim_v12e@merveilles.town
 (DIR) Post #B47Qly3XRpR0OFpVNQ by wim_v12e@merveilles.town
       0 likes, 0 repeats
       
       I'm working on a little #Uxntal optimisation algorithm that is fundamentally of little use,  it's one of those "I can't help myself" things, but I think it is quite nice:What it does is, where possible, eliminate stores and loads in an <addr> <store with keep> ... <load> sequence, regardless of the intervening sequence. So it disentangles the stack juggling needed to put the address at the top of the stack for the load from the other operations. After that is done, I have another algorithm that can eliminate the store/load pairs altogether. I'll explain more when I actually get it to work.
       
 (DIR) Post #B47QlyEsleVaxR8Z3g by neauoire@merveilles.town
       0 likes, 0 repeats
       
       @wim_v12e I'm always looking to expand the list of peep-hole optimizations :) If you find a good pattern replacement for store with keep, I'm taking!https://git.sr.ht/~rabbits/uxnlin/tree/main/item/src/assets.tal
       
 (DIR) Post #B47QxwWwwhqP8LITEe by wim_v12e@merveilles.town
       0 likes, 0 repeats
       
       @neauoire this one is not peep-hole, but I have a series of those as well, happy to share when I am confident it all works.
       
 (DIR) Post #B47Sieo0lQHXj37GZk by neauoire@merveilles.town
       0 likes, 0 repeats
       
       @wim_v12e ah! yes, I'd love to grow the list. That means everyone's programs get better when there's new peephole discoveries :) I'm also curious to see what you're working on with the load/store thing.
       
 (DIR) Post #B47k4K6M7Wa56Xc6hU by wim_v12e@merveilles.town
       0 likes, 0 repeats
       
       @neauoire Hopefully it won't be too long before I get it working, I'm keen to do a write-up.