[PATCH] [PlaceSafepoints] Use the analysis infrastructure rather than an inner pass manager

Pat Gavlin pagavlin at microsoft.com
Mon May 18 10:24:18 PDT 2015


================
Comment at: include/llvm/Transforms/Utils/Local.h:285-290
@@ -283,1 +284,8 @@
 
+/// \brief Remove all blocks which fail the isReachableFromEntry predicate on
+/// the provided domtree.  This is less aggressive about removing dead code
+/// than removeUnreachableBlocks, but is able to keep various analyzes up to
+/// date in the process.  Calling this function is sufficient to ensure that
+/// dominance questions on any remaining instructions return sensical results;
+/// no self reference cycles can remain.
+bool removeBlocksNotReachableFromEntry(Function &F, DominatorTree &DT,
----------------
igor-laevsky wrote:
> Can you please add an example on when differences between "removeBlocksNotReachableFromEntry" and "removeUnreachableBlocks" do matter?
+1 to this. The code looks good to me, but it would be nice to have some examples--ideally in the form of tests--of the properties of `removeBlocksNotReachableFromEntry`.

http://reviews.llvm.org/D9761

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






More information about the llvm-commits mailing list