Skip to content
Snippets Groups Projects
  • Chandler Carruth's avatar
    Begin chipping away at one of the biggest quadratic-ish behaviors in · 0af6a0bb
    Chandler Carruth authored
    this pass. We're leaving already merged blocks on the worklist, and
    scanning them again and again only to determine each time through that
    indeed they aren't viable. We can instead remove them once we're going
    to have to scan the worklist. This is the easy way to implement removing
    them. If this remains on the profile (as I somewhat suspect it will), we
    can get a lot more clever here, as the worklist's order is essentially
    irrelevant. We can use swapping and fold the two loops to reduce
    overhead even when there are many blocks on the worklist but only a few
    of them are removed.
    
    llvm-svn: 144531
    0af6a0bb