(self)
RegionSimplifier performs the following simplifications:
        - Remove redundant Gotos
        - Remove redundant If/If-else statements
RegionSimplifier performs the following simplifications:
        - Remove redundant Gotos
        - Remove redundant If/If-else statements
RegionSimplifier performs the following simplifications : - Remove redundant Gotos - Remove redundant If / If - else statements
def _simplify(self):
        """
        RegionSimplifier performs the following simplifications:
        - Remove redundant Gotos
        - Remove redundant If/If-else statements
        """

        r = self.region
        # Fold expressions that are only used once into their use sites
        r = self._fold_oneuse_expressions(r)
        # Remove empty nodes
        r = self._remove_empty_nodes(r)
        # Find nested if-else constructs and convert them into CascadingIfs
        r = self._transform_to_cascading_ifs(r)
        # Remove unnecessary Jump statements
        r = self._simplify_gotos(r)
        # Remove unnecessary jump or conditional jump statements if they jump to the successor right afterwards
        r = self._simplify_ifs(r)
        # Remove unnecessary else branches if the if branch will always return
        r = self._simplify_ifelses(r)
        #
        r = self._simplify_cascading_ifs(r)
        #
        r = self._simplify_loops(r)

        self.result = r
def _simplify ( self ) : r = self . region # Fold expressions that are only used once into their use sites r = self . _fold_oneuse_expressions ( r ) # Remove empty nodes r = self . _remove_empty_nodes ( r ) # Find nested if-else constructs and convert them into CascadingIfs r = self . _transform_to_cascading_ifs ( r ) # Remove unnecessary Jump statements r = self . _simplify_gotos ( r ) # Remove unnecessary jump or conditional jump statements if they jump to the successor right afterwards r = self . _simplify_ifs ( r ) # Remove unnecessary else branches if the if branch will always return r = self . _simplify_ifelses ( r ) # r = self . _simplify_cascading_ifs ( r ) # r = self . _simplify_loops ( r ) self . result = r