OSDN Git Service

Use external df iterators to avoid revisiting blocks in functions with
authorChris Lattner <sabre@nondot.org>
Mon, 13 Oct 2003 16:44:50 +0000 (16:44 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 13 Oct 2003 16:44:50 +0000 (16:44 +0000)
multiple setjmp calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9093 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/LowerSetJmp.cpp

index 36f06bd..5be2514 100644 (file)
@@ -137,7 +137,9 @@ bool LowerSetJmp::run(Module& M)
     for (Value::use_iterator B = SetJmp->use_begin(), E = SetJmp->use_end();
          B != E; ++B) {
       BasicBlock* BB = cast<Instruction>(*B)->getParent();
-      DFSBlocks.insert(df_begin(BB), df_end(BB));
+      for (df_ext_iterator<BasicBlock*> I = df_ext_begin(BB, BBSet),
+             E = df_ext_end(BB, BBSet); I != E; ++I)
+        /* empty */;
     }
 
     while (!SetJmp->use_empty()) {