GCC Middle and Back End API Reference
hw_doloop_hooks Struct Reference

#include <hw-doloop.h>

Collaboration diagram for hw_doloop_hooks:

Data Fields

rtx(* end_pattern_reg )(rtx_insn *insn)
bool(* opt )(hwloop_info loop)
void(* fail )(hwloop_info loop)

Detailed Description

A set of hooks to be defined by a target that wants to use the reorg_loops

reorg_loops is intended to handle cases where special hardware loop
setup instructions are required before the loop, for example to set
up loop counter registers that are not exposed to the register
allocator, or to inform the hardware about loop bounds.

reorg_loops performs analysis to discover loop_end patterns created
by the earlier loop-doloop pass, and sets up a hwloop_info
structure for each such insn it finds.  It then tries to discover
the basic blocks containing the loop by tracking the lifetime of
the iteration register.

If a valid loop can't be found, the FAIL function is called;
otherwise the OPT function is called for each loop, visiting
innermost loops first and ascending.   

Field Documentation

◆ end_pattern_reg

rtx(* hw_doloop_hooks::end_pattern_reg) (rtx_insn *insn)

Referenced by discover_loops().

◆ fail

void(* hw_doloop_hooks::fail) (hwloop_info loop)

Referenced by optimize_loop().

◆ opt

bool(* hw_doloop_hooks::opt) (hwloop_info loop)

Referenced by optimize_loop().

The documentation for this struct was generated from the following file: