From 720ac9196997e856c5fed7a23fdfe144425222b1 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 5 Jan 2012 22:21:45 +0000 Subject: [PATCH] SCCCaptured is trivially false on entry to this loop and not modified inside it. Eliminate the dead test for it on each loop iteration. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147616 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/FunctionAttrs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index 9e30c40e20c..f3f62284334 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -461,7 +461,7 @@ bool FunctionAttrs::AddNoCaptureAttrs(const CallGraphSCC &SCC) { } if (SCCCaptured) continue; - for (unsigned i = 0, e = ArgumentSCC.size(); i != e && !SCCCaptured; ++i) { + for (unsigned i = 0, e = ArgumentSCC.size(); i != e; ++i) { Argument *A = ArgumentSCC[i]->Definition; A->addAttr(Attribute::NoCapture); ++NumNoCapture; -- 2.34.1