On Fri, Oct 4, 2024 at 1:47 PM Sid Maxwell via Gcc <gcc@gcc.gnu.org> wrote:
>
> I haven't found anything in my digging, so I'd like to ask if anyone knows
> of any mechanism in GCC for conducting peephole optimization on generated
> code.  I can imagine doing this as a pass over the generated code from
> within the backend, or as a separate process between cc1 and as.  I'm
> working with a derivative of 4.3.

There's define_peephole and define_peephole2 in the machine description.
It works on RTL of course but is essentially what you are looking for?

Richard.

>
> -+- Sid

Reply via email to