GCC Middle and Back End API Reference
find_comparison_dom_walker Class Reference
Inheritance diagram for find_comparison_dom_walker:
Collaboration diagram for find_comparison_dom_walker:

Public Member Functions

 find_comparison_dom_walker (cdi_direction direction)
virtual void before_dom_children (basic_block)
void walk (basic_block)
virtual void after_dom_children (basic_block)

Constructor & Destructor Documentation

find_comparison_dom_walker::find_comparison_dom_walker ( cdi_direction  direction)
inline

Member Function Documentation

virtual void dom_walker::after_dom_children ( basic_block  )
inlinevirtualinherited
void find_comparison_dom_walker::before_dom_children ( basic_block  bb)
virtual

Identify comparison instructions within BB. If the flags from the last compare in the BB is live at the end of the block, install the compare in BB->AUX. Called via dom_walker.walk ().

 The last comparison that was made.  Will be reset to NULL
 once the flags are clobbered.   
 True iff the last comparison has not been clobbered, nor
 have its inputs.  Used to eliminate duplicate compares.   
 The last insn that clobbered the flags, if that insn is of
 a form that may be valid for eliminating a following compare.
 To be reset to NULL once the flags are set otherwise.   
 Propagate the last live comparison throughout the extended basic block.  
     Compute the set of registers modified by this instruction.   
         Eliminate a compare that's redundant with the previous.   
             New mode is incompatible with the previous compare mode.   
                 Generate new comparison for substitution.   
         It's unusual, but be prepared for comparison patterns that
         also clobber an input, or perhaps a scratch.   
     Notice if this instruction kills the flags register.   
         See if this insn could be the "clobber" that eliminates
         a future comparison.    
         In either case, the previous compare is no longer valid.   
     Notice if this instruction uses the flags register.   
     Notice if any of the inputs to the comparison have changed.   
 Remember the live comparison for subsequent members of
 the extended basic block.   
     Look to see if the flags register is live outgoing here, and
     incoming to any successor not part of the extended basic block.   

Reimplemented from dom_walker.

void dom_walker::walk ( basic_block  bb)
inherited

Walk the dominator tree.

Recursively walk the dominator tree. BB is the basic block we are currently visiting.

     Don't worry about unreachable blocks.   
         Callback for subclasses to do custom things before we have walked
         the dominator children, but before we walk statements.   
         Mark the current BB to be popped out of the recursion stack
         once children are processed.   
     NULL is used to mark pop operations in the recursion stack.   
         Callback allowing subclasses to do custom things after we have
         walked dominator children, but before we walk statements.   

References bb_postorder, inverted_post_order_compute(), last_basic_block, n_basic_blocks, and postorder_num.


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