summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-27 22:44:59 +0000
committerChris Lattner <sabre@nondot.org>2005-09-27 22:44:59 +0000
commit5b3c70263b27dcab5e588c7de40a67be0738be6a (patch)
tree551c66c8165b6a7f1aba7c90aeb11c1272cf1b7d
parent9a5582f2516634f5b66c9bbdbab5360d6eb3ef35 (diff)
downloadexternal_llvm-5b3c70263b27dcab5e588c7de40a67be0738be6a.zip
external_llvm-5b3c70263b27dcab5e588c7de40a67be0738be6a.tar.gz
external_llvm-5b3c70263b27dcab5e588c7de40a67be0738be6a.tar.bz2
add a note about a way to improve this code further, that I won't be getting
to right now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23485 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 0f664e1..d74633b 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/LowerInvoke.cpp
@@ -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