Fix pr31141.
If a loop is nested inside another loop, alias information is saved in
LoopToAliasSetMap. Later when processing the outer loop, this alias
information is collected and erased from LoopToAliasSetMap.
However, when the outer loop is deleted by other loop pass, the information
saved in LoopToAliasSetMap by its subloops will not get erased. This patch
clear the LoopToAliasSetMap when a loop being deleted is outermost or
removed from its parent loop.
Need an explanation here for why we're clearing the map in exactly these circumstances. It isn't obvious that we won't lose useful cached information, or that we don't need to clear the map if the loop has a parent.