[llvm-branch-commits] [cfe-branch] r277772 - [docs] Add 3.9 release notes for the static analyzer.

2016-08-04 Thread Devin Coughlin via llvm-branch-commits
Author: dcoughlin
Date: Thu Aug  4 16:27:47 2016
New Revision: 22

URL: http://llvm.org/viewvc/llvm-project?rev=22&view=rev
Log:
[docs] Add 3.9 release notes for the static analyzer.

Modified:
cfe/branches/release_39/docs/ReleaseNotes.rst

Modified: cfe/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=22&r1=21&r2=22&view=diff
==
--- cfe/branches/release_39/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_39/docs/ReleaseNotes.rst Thu Aug  4 16:27:47 2016
@@ -232,7 +232,27 @@ libclang
 Static Analyzer
 ---
 
-...
+The scan-build and scan-build-py tools now include a 
+``--force-analyze-debug-code`` flag to force projects to build in debug mode.
+This can result in more precise analysis because it leaves in assertions.
+
+On Windows, checks for memory leaks, double frees, and use-after-free problems
+are now enabled by default.
+
+The analyzer now supports Objective-C class properties.
+
+Diagnostics for misuse of _Nonnull are greatly improved.
+
+Several new checkers were added:
+
+- The analyzer now checks for incorrect usage of MPI APIs in C and C++. This
+  check can be enabled by passing the following command to scan-build:
+  ``-enable-checker optin.mpi.MPI-Checker``.
+- The analyzer now checks for improper retains and releases of ivars 
synthesized
+  for properties in Objective-C ``-dealloc`` methods under manual
+  retain/release.
+- The analyzer now checks for missing and extra calls to ``[super dealloc]``
+  under manual retain/release.
 
 Core Analysis Improvements
 ==


___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r277781 - Merging r277691, r277693, and r277773:

2016-08-04 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Aug  4 17:44:36 2016
New Revision: 277781

URL: http://llvm.org/viewvc/llvm-project?rev=277781&view=rev
Log:
Merging r277691, r277693, and r23:


r277691 | majnemer | 2016-08-03 21:24:02 -0700 (Wed, 03 Aug 2016) | 4 lines

Reinstate "[CloneFunction] Don't remove side effecting calls"

This reinstates r277611 + r277614 and reverts r277642.  A cast_or_null
should have been a dyn_cast_or_null.



r277693 | majnemer | 2016-08-03 21:47:18 -0700 (Wed, 03 Aug 2016) | 1 line

Forgot the dyn_cast_or_null intended for r277691.



r23 | majnemer | 2016-08-04 14:28:59 -0700 (Thu, 04 Aug 2016) | 6 lines

[CloneFunction] Add a testcase for r277691/r277693

PR28848 had a very nice reduction of the underlying cause of the bug.
Our ValueMap had, in an entry for an Instruction, a ConstantInt.

This is not at all unexpected but should be handled properly.


Modified:
llvm/branches/release_39/   (props changed)
llvm/branches/release_39/lib/Analysis/InstructionSimplify.cpp
llvm/branches/release_39/lib/Transforms/Utils/CloneFunction.cpp
llvm/branches/release_39/test/Transforms/Inline/inline_constprop.ll

Propchange: llvm/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug  4 17:44:36 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276740,276956,276980,277114,277135,277371,277500,277504,277625
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276740,276956,276980,277114,277135,277371,277500,277504,277625,277691,277693,23

Modified: llvm/branches/release_39/lib/Analysis/InstructionSimplify.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/lib/Analysis/InstructionSimplify.cpp?rev=277781&r1=277780&r2=277781&view=diff
==
--- llvm/branches/release_39/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/branches/release_39/lib/Analysis/InstructionSimplify.cpp Thu Aug  4 
17:44:36 2016
@@ -4277,7 +4277,8 @@ static bool replaceAndRecursivelySimplif
 
 // Gracefully handle edge cases where the instruction is not wired into any
 // parent block.
-if (I->getParent())
+if (I->getParent() && !I->isEHPad() && !isa(I) &&
+!I->mayHaveSideEffects())
   I->eraseFromParent();
   } else {
 Worklist.insert(I);
@@ -4305,7 +4306,8 @@ static bool replaceAndRecursivelySimplif
 
 // Gracefully handle edge cases where the instruction is not wired into any
 // parent block.
-if (I->getParent())
+if (I->getParent() && !I->isEHPad() && !isa(I) &&
+!I->mayHaveSideEffects())
   I->eraseFromParent();
   }
   return Simplified;

Modified: llvm/branches/release_39/lib/Transforms/Utils/CloneFunction.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/lib/Transforms/Utils/CloneFunction.cpp?rev=277781&r1=277780&r2=277781&view=diff
==
--- llvm/branches/release_39/lib/Transforms/Utils/CloneFunction.cpp (original)
+++ llvm/branches/release_39/lib/Transforms/Utils/CloneFunction.cpp Thu Aug  4 
17:44:36 2016
@@ -14,6 +14,7 @@
 
//===--===//
 
 #include "llvm/Transforms/Utils/Cloning.h"
+#include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Analysis/ConstantFolding.h"
 #include "llvm/Analysis/InstructionSimplify.h"
@@ -552,9 +553,39 @@ void llvm::CloneAndPruneIntoFromInst(Fun
   // two PHINodes, the iteration over the old PHIs remains valid, and the
   // mapping will just map us to the new node (which may not even be a PHI
   // node).
+  const DataLayout &DL = NewFunc->getParent()->getDataLayout();
+  SmallSetVector Worklist;
   for (unsigned Idx = 0, Size = PHIToResolve.size(); Idx != Size; ++Idx)
-if (PHINode *PN = dyn_cast(VMap[PHIToResolve[Idx]]))
-  recursivelySimplifyInstruction(PN);
+if (isa(VMap[PHIToResolve[Idx]]))
+  Worklist.insert(PHIToResolve[Idx]);
+
+  // Note that we must test the size on each iteration,