add a note about a way to improve this code further, that I won't be getting
authorChris Lattner <sabre@nondot.org>
Tue, 27 Sep 2005 22:44:59 +0000 (22:44 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Sep 2005 22:44:59 +0000 (22:44 +0000)
to right now.

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

lib/Transforms/Utils/LowerInvoke.cpp

index 0f664e151f934ddcd353117757282110bf93cbf2..d74633b82b8684aa73320c0014b6ae606b63f2a2 100644 (file)
@@ -412,6 +412,14 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
 
   NumInvokes += Invokes.size();
   NumUnwinds += Unwinds.size();
+  
+  // TODO: This is not an optimal way to do this.  In particular, this always
+  // inserts setjmp calls into the entries of functions with invoke instructions
+  // even though there are possibly paths through the function that do not
+  // execute any invokes.  In particular, for functions with early exits, e.g.
+  // the 'addMove' method in hexxagon, it would be nice to not have to do the
+  // setjmp stuff on the early exit path.  This requires a bit of dataflow, but
+  // would not be too hard to do.
 
   // If we have an invoke instruction, insert a setjmp that dominates all
   // invokes.  After the setjmp, use a cond branch that goes to the original