[PATCH] D24117: Fix inliner funclet unwind memoization

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 00:04:00 PDT 2016


majnemer added inline comments.

================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:420
@@ -392,2 +419,3 @@
   while (!Worklist.empty()) {
     Instruction *UselessPad = Worklist.pop_back_val();
+    auto Memo = MemoMap.find(UselessPad);
----------------
What if we adopted a protocol similar to the ancestor walk? We could call `getUnwindDestTokenHelper` for `UseLessPad` before we check if something is in the `MemoMap`.  If the `MemoMap` didn't have an entry for `UseLessPad` (or that entry was `nullptr`), we give it `LastUselessPad`.  Otherwise, we `continue`.


https://reviews.llvm.org/D24117





More information about the llvm-commits mailing list