gccint: Peephole Definitions

1 
1 17.18 Machine-Specific Peephole Optimizers
1 ==========================================
1 
1 In addition to instruction patterns the 'md' file may contain
1 definitions of machine-specific peephole optimizations.
1 
1  The combiner does not notice certain peephole optimizations when the
1 data flow in the program does not suggest that it should try them.  For
1 example, sometimes two consecutive insns related in purpose can be
1 combined even though the second one does not appear to use a register
1 computed in the first one.  A machine-specific peephole optimizer can
1 detect such opportunities.
1 
1  There are two forms of peephole definitions that may be used.  The
1 original 'define_peephole' is run at assembly output time to match insns
1 and substitute assembly text.  Use of 'define_peephole' is deprecated.
1 
1  A newer 'define_peephole2' matches insns and substitutes new insns.
1 The 'peephole2' pass is run after register allocation but before
1 scheduling, which may result in much better code for targets that do
1 scheduling.
1 

Menu