[PATCH] D17443: [LPM] Document the new helpers to make it easy to get consistent require and preserve behavior from loop passes.
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 19 02:57:47 PST 2016
chandlerc created this revision.
chandlerc added a reviewer: jmolloy.
chandlerc added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.
Note that I'm pretty terrible at documentation. If what I've written isn't
helping, please just suggest what would make sense here. Happy to iterate and
get something useful.
http://reviews.llvm.org/D17443
Files:
docs/WritingAnLLVMPass.rst
Index: docs/WritingAnLLVMPass.rst
===================================================================
--- docs/WritingAnLLVMPass.rst
+++ docs/WritingAnLLVMPass.rst
@@ -525,6 +525,14 @@
these methods should return ``true`` if they modified the program, or ``false``
if they didn't.
+A ``LoopPass`` subclass which is intended to run as part of the main loop pass
+pipeline needs to preserve all of the same *function* analyses that the other
+loop passes in its pipeline require. To make that easier,
+a ``getLoopAnalysisUsage`` function is provided by ``LoopUtils.h``. It can be
+called within the subclass's ``getAnalysisUsage`` override to get consistent
+and correct behavior. Analogously, ``INITIALIZE_PASS_DEPENDENCY(LoopPass)``
+will initialize this set of function analyses.
+
The ``doInitialization(Loop *, LPPassManager &)`` method
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17443.48471.patch
Type: text/x-patch
Size: 905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160219/6b521fe5/attachment.bin>
More information about the llvm-commits
mailing list