From: Nick Lewycky Date: Wed, 25 Jul 2012 21:19:40 +0000 (+0000) Subject: It's not safe to blindly remove invoke instructions. This happens when we X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b8cd66b5d78eaeba41ab372aaca5180dd54e4385;p=oota-llvm.git It's not safe to blindly remove invoke instructions. This happens when we encounter an invoke of an allocation function. This should fix the dragonegg bootstrap. Testcase to follow, later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160757 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 72623a36e50..6d950d20240 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -352,7 +352,8 @@ static bool IsSafeComputationToRemove(Value *V) { return true; if (!V->hasOneUse()) return false; - if (isa(V) || isa(V) || isa(V)) + if (isa(V) || isa(V) || isa(V) || + isa(V)) return false; if (isAllocationFn(V)) return true;