Lines Matching +full:release +full:- +full:doxygen
10 Introduction --- What is a pass?
27 <https://llvm.org/doxygen/classllvm_1_1Pass.html>`_ class, which implement
30 <writing-an-llvm-pass-ModulePass>` , :ref:`CallGraphSCCPass
31 <writing-an-llvm-pass-CallGraphSCCPass>`, :ref:`FunctionPass
32 <writing-an-llvm-pass-FunctionPass>` , or :ref:`LoopPass
33 <writing-an-llvm-pass-LoopPass>`, or :ref:`RegionPass
34 <writing-an-llvm-pass-RegionPass>` classes, which gives the system more
40 .. _writing-an-llvm-pass-pass-classes:
56 ---------------------------
59 <https://llvm.org/doxygen/classllvm_1_1ImmutablePass.html>`_" class. This pass
71 .. _writing-an-llvm-pass-ModulePass:
74 ------------------------
76 The `ModulePass <https://llvm.org/doxygen/classllvm_1_1ModulePass.html>`_ class
97 .. code-block:: c++
105 .. _writing-an-llvm-pass-CallGraphSCCPass:
108 ------------------------------
111 <https://llvm.org/doxygen/classllvm_1_1CallGraphSCCPass.html>`_ is used by
112 passes that need to traverse the program bottom-up on the call graph (callees
117 :ref:`FunctionPass <writing-an-llvm-pass-FunctionPass>`, you should derive from
120 ``TODO``: explain briefly what SCC, Tarjan's algo, and B-U mean.
132 <writing-an-llvm-pass-runOnSCC>` (including global data).
142 .. code-block:: c++
153 .. _writing-an-llvm-pass-runOnSCC:
158 .. code-block:: c++
169 .. code-block:: c++
175 <writing-an-llvm-pass-runOnSCC>` for every SCC in the program being compiled.
177 .. _writing-an-llvm-pass-FunctionPass:
180 --------------------------
183 <https://llvm.org/doxygen/classllvm_1_1Pass.html>`_ subclasses do have a
196 <writing-an-llvm-pass-runOnFunction>` (including global data).
203 .. _writing-an-llvm-pass-doInitialization-mod:
208 .. code-block:: c++
220 <https://llvm.org/doxygen/LowerAllocations_8cpp-source.html>`_ pass. This pass
226 .. _writing-an-llvm-pass-runOnFunction:
231 .. code-block:: c++
239 .. _writing-an-llvm-pass-doFinalization-mod:
244 .. code-block:: c++
250 <writing-an-llvm-pass-runOnFunction>` for every function in the program being
253 .. _writing-an-llvm-pass-LoopPass:
256 ----------------------
258 All ``LoopPass`` execute on each :ref:`loop <loop-terminology>` in the function
279 .. code-block:: c++
289 .. _writing-an-llvm-pass-runOnLoop:
294 .. code-block:: c++
306 .. code-block:: c++
312 <writing-an-llvm-pass-runOnLoop>` for every loop in the program being compiled.
314 .. _writing-an-llvm-pass-RegionPass:
317 ------------------------
319 ``RegionPass`` is similar to :ref:`LoopPass <writing-an-llvm-pass-LoopPass>`,
332 .. code-block:: c++
342 .. _writing-an-llvm-pass-runOnRegion:
347 .. code-block:: c++
359 .. code-block:: c++
365 <writing-an-llvm-pass-runOnRegion>` for every region in the program being
370 ---------------------------------
373 the machine-dependent representation of each LLVM function in the program.
389 <writing-an-llvm-pass-runOnMachineFunction>` (including global data).
391 .. _writing-an-llvm-pass-runOnMachineFunction:
396 .. code-block:: c++
406 the machine-dependent representation of the function. If you want to get at
408 ``MachineFunction``'s ``getFunction()`` accessor method --- but remember, you
412 .. _writing-an-llvm-pass-registration:
415 -----------------
420 name of the pass, which is to be used for the :option:`-help` output of
421 programs, as well as for debug output generated by the `--debug-pass` option.
429 .. code-block:: c++
436 works. Use the opt ``-analyze`` argument to invoke this method.
445 .. _writing-an-llvm-pass-interaction:
448 --------------------------------------
452 :ref:`optimize the execution of passes <writing-an-llvm-pass-passmanager>` it
462 <writing-an-llvm-pass-getAnalysisUsage>` method, it defaults to not having any
465 .. _writing-an-llvm-pass-getAnalysisUsage:
470 .. code-block:: c++
477 <https://llvm.org/doxygen/classllvm_1_1AnalysisUsage.html>`_ object with
493 <aliasanalysis-chaining>` to other alias analysis passes. In cases where
525 .. code-block:: c++
533 .. _writing-an-llvm-pass-getAnalysis:
540 with the :ref:`getAnalysisUsage <writing-an-llvm-pass-getAnalysisUsage>`
544 .. code-block:: c++
554 <writing-an-llvm-pass-getAnalysisUsage>` implementation. This method can be
561 .. code-block:: c++
577 .. code-block:: c++
586 The `Statistic <https://llvm.org/doxygen/Statistic_8h_source.html>`_ class is
588 These statistics are printed at the end of a run, when the :option:`-stats`
592 .. _writing-an-llvm-pass-passmanager:
595 ---------------------
597 The `PassManager <https://llvm.org/doxygen/PassManager_8h_source.html>`_ `class
598 <https://llvm.org/doxygen/classllvm_1_1PassManager.html>`_ takes a list of
599 passes, ensures their :ref:`prerequisites <writing-an-llvm-pass-interaction>`
612 <writing-an-llvm-pass-releaseMemory>` allocated to holding analysis results
618 of consecutive :ref:`FunctionPass <writing-an-llvm-pass-FunctionPass>`, it
620 <writing-an-llvm-pass-FunctionPass>` on the first function, then all of the
621 :ref:`FunctionPasses <writing-an-llvm-pass-FunctionPass>` on the second
628 <https://llvm.org/doxygen/classllvm_1_1DominatorSet.html>`_ needs to be
634 unimplemented :ref:`getAnalysisUsage <writing-an-llvm-pass-getAnalysisUsage>`
638 The ``PassManager`` class exposes a ``--debug-pass`` command line options that
641 information about all of the variants of the ``--debug-pass`` option, just type
642 "``llc -help-hidden``").
644 By using the --debug-pass=Structure option, for example, we can see inspect the
647 .. code-block:: console
649 $ llc -mtriple=arm64-- -O3 -debug-pass=Structure file.ll > /dev/null
652 Pre-ISel Intrinsic Lowering
667 .. _writing-an-llvm-pass-releaseMemory:
672 .. code-block:: c++
684 the :ref:`getAnalysis <writing-an-llvm-pass-getAnalysis>` method) you should
685 implement ``releaseMemory`` to, well, release the memory allocated to maintain
716 -------------------------
726 .. code-block:: c++
733 .. code-block:: c++
743 .. code-block:: c++
750 :option:`-help` query.
752 .. code-block:: console
754 $ llc -help
756 -regalloc - Register allocator to use (default=linearscan)
757 =linearscan - linear scan register allocator
758 =local - local register allocator
759 =simple - simple register allocator
760 =myregalloc - my register allocator help string
763 And that's it. The user is now free to use ``-regalloc=myregalloc`` as an
775 -----------------------
784 .. code-block:: c++
790 .. code-block:: c++
802 ----------------------------------------
819 .. code-block:: console
828 This GDB was configured as "sparc-sun-solaris2.6"...
838 .. code-block:: console
842 (gdb) run test.bc -load $(LLVMTOP)/llvm/Debug+Asserts/lib/[libname].so -[passoption]
843 Starting program: opt test.bc -load $(LLVMTOP)/llvm/Debug+Asserts/lib/[libname].so -[passoption]
845 70 bool PassManager::run(Module &M) { return PM->run(M); }
861 capability. The only solution I know of is to de-inline a function (move it
869 already set in your pass, run the program, and re-set the breakpoints once