[llvm] r179717 - [objc-arc] Added an option to arc-annotations for turning off CheckForCFGHazard.

Michael Gottesman mgottesman at apple.com
Wed Apr 17 13:48:01 PDT 2013


Author: mgottesman
Date: Wed Apr 17 15:48:01 2013
New Revision: 179717

URL: http://llvm.org/viewvc/llvm-project?rev=179717&view=rev
Log:
[objc-arc] Added an option to arc-annotations for turning off CheckForCFGHazard.

Modified:
    llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp

Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp?rev=179717&r1=179716&r2=179717&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARCOpts.cpp Wed Apr 17 15:48:01 2013
@@ -710,6 +710,9 @@ void BBState::MergeSucc(const BBState &O
 /// Enable/disable ARC sequence annotations.
 static cl::opt<bool>
 EnableARCAnnotations("enable-objc-arc-annotations", cl::init(false));
+static cl::opt<bool>
+EnableCheckForCFGHazards("enable-objc-arc-checkforcfghazards",
+                         cl::init(true));
 
 /// This function appends a unique ARCAnnotationProvenanceSourceMDKind id to an
 /// instruction so that we can track backwards when post processing via the llvm
@@ -2170,6 +2173,9 @@ ObjCARCOpt::VisitTopDown(BasicBlock *BB,
   // bottom of the basic block.
   ANNOTATE_TOPDOWN_BBEND(MyStates, BB);
 
+#ifdef ARC_ANNOTATIONS
+  if (EnableARCAnnotations && EnableCheckForCFGHazards)
+#endif
   CheckForCFGHazards(BB, BBStates, MyStates);
   return NestingDetected;
 }





More information about the llvm-commits mailing list