Page MenuHomePhabricator

[SjLj] Replace recursive block marking algorithm with iterative algorithm

Authored by Gerolf on Jul 6 2017, 9:34 PM.



Some programs run into a stack overflow issue. This change avoids this
problem by replacing the recursive algorithm with the iterative version.

Event Timeline

Gerolf created this revision.Jul 6 2017, 9:34 PM
MatzeB accepted this revision.Jul 10 2017, 1:30 PM

Looks good to me. Possible improvement below.



for (BasicBlock *B : inverse_depth_first_ext(BB, LiveBBs)) {
  /* Empty: We want to produce the visited set. */

works as well? So we can leave out the first if and only need a single set.

This revision is now accepted and ready to land.Jul 10 2017, 1:30 PM
Gerolf closed this revision.Jul 12 2017, 4:05 PM