[PATCH] Don't crash on leaving nested __finally blocks through an EH edge.

Reid Kleckner rnk at google.com
Thu Feb 26 14:31:38 PST 2015


lgtm


================
Comment at: lib/CodeGen/CGException.cpp:1936
@@ -1935,3 @@
-    if (!HaveInsertPoint()) {
-      FI.ContBB->eraseFromParent();
-      if (FI.ResumeBB)
----------------
thakis wrote:
> rnk wrote:
> > Can we check !HaveInsertPoint() && FI.ContBB->hasZeroUses() instead and still be clever?
> You mean `use_empty()`? I tried that (`if (FI.ContBB.use_empty() && (!FI.ResumeBB || FI.ResumeBB.use_empty())`) and that didn't immediately work. But then I though even if it did, he benefits of being clever seem not worth it over having more control flow, and I stopped trying immediately and sent this out as-is :-)
OK. SEH finally is super rare. In general, though, the best way to speed up -O0 codegen is to emit less code.

http://reviews.llvm.org/D7918

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list