[go-nuts] Re: gc: optimize JMP to RET instructions

2024-08-14 Thread Arseny Samoylov
Thank you for your answer! > We generally don't do optimizations like that directly on assembly. I definitely agree. But this is also a pattern for generated code. > and concerns about debuggability (can you set a breakpoint on each return in the source?) also matter This is an interesting probl

[go-nuts] Re: gc: optimize JMP to RET instructions

2024-08-13 Thread 'Keith Randall' via golang-nuts
We generally don't do optimizations like that directly on assembly. In fact, we used to do some like that but they have been removed. We want the generated machine code to faithfully mirror the assembly input. People writing assembly have all kind of reasons for laying out instructions in partic