Lines Matching +full:release +full:- +full:doxygen
17 available in the LLVM source-base. This manual is not intended to explain what
26 do something, but it's not listed, check the source. Links to the `doxygen
27 <https://llvm.org/doxygen/>`__ sources are provided to make this as easy as
34 traversal routines, and useful utilities like the ``InstVisitor`` (`doxygen
35 <https://llvm.org/doxygen/InstVisitor_8h_source.html>`__) template.
43 the LLVM source-base, but that isn't specific to any particular API.
48 ---------------------------------
59 <https://en.cppreference.com/w/>`_ - an excellent
63 <https://cplusplus.com/reference/>`_ - another excellent
66 #. `C++ In a Nutshell <http://www.tempest-sw.com/cpp/>`_ - This is an O'Reilly
71 #. `C++ Frequently Asked Questions <https://www.parashift.com/c++-faq-lite/>`_.
87 -----------------------
90 <http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html>`_
103 ------------------------------------------------------
105 The LLVM source-base makes extensive use of a custom form of RTTI. These
108 ``dynamic_cast<>`` only works on classes that have a v-table). Because they are
110 templates are defined in the ``llvm/Support/Casting.h`` (`doxygen
111 <https://llvm.org/doxygen/Casting_8h_source.html>`__) file (note that you very
128 .. code-block:: c++
135 return !L->contains(cast<Instruction>(V)->getParent());
150 .. code-block:: c++
185 These five templates can be used with any classes, whether they have a v-table
187 :doc:`How to set up LLVM-style RTTI for your class hierarchy
193 ---------------------------------------------------------
197 -- which has names for instructions, functions, etc. -- and the ``StringMap``
215 It can be implicitly constructed using a C style null-terminated string, an
219 .. code-block:: c++
225 .. code-block:: c++
233 the ``str`` member function. See ``llvm/ADT/StringRef.h`` (`doxygen
234 <https://llvm.org/doxygen/StringRef_8h_source.html>`__) for more
246 The ``Twine`` (`doxygen <https://llvm.org/doxygen/classllvm_1_1Twine.html>`__)
251 .. code-block:: c++
253 New = CmpInst::Create(..., SO->getName() + ".cmp");
263 concatenation. See ``llvm/ADT/Twine.h`` (`doxygen
264 <https://llvm.org/doxygen/Twine_8h_source.html>`__) and :ref:`here <dss_twine>`
275 ---------------------------------------------
278 outputs such as ``llvm-readobj`` to printing verbose disassembly listings and
285 strings, especially for platform-specific types like ``size_t`` or pointer types.
298 ``N`` refers to the 0-based index of the argument from the list of replacement
305 alignment style can be one of the characters ``-`` (left align), ``=`` (center align),
320 .. code-block:: c++
342 .. code-block:: c++
348 // Do whatever is necessary to format ``this->Item`` into ``Stream``
368 doxygen documentation or by looking at the unit test suite.
371 .. code-block:: c++
377 // Out-of-order referencing and multi-referencing
382 S = formatv("{0,-7}", 'a'); // S == "a ";
387 S = formatv("{0:N} - {0:x} - {1:E}", 12345, 123908342); // S == "12,345 - 0x3039 - 1.24E8"
403 --------------
405 Proper error handling helps us identify bugs in our code, and helps end-users
422 .. code-block:: c++
429 .. code-block:: c++
454 situations where you absolutely must emit a non-programmatic error and
462 actually a lightweight wrapper for user-defined error types, allowing arbitrary
464 exceptions allow throwing of user-defined types.
468 .. code-block:: c++
476 Success values are very cheap to construct and return - they have minimal
482 .. code-block:: c++
512 .. code-block:: c++
530 .. code-block:: c++
555 .. code-block:: c++
573 useful to enable ``operator->()`` the ``Expected<T>`` value has pointer-like
576 .. code-block:: c++
588 return processBuffer(MB->getBuffer());
592 can be useful if the ``Expected<T>`` value needs to be stored an already-declared
595 .. code-block:: c++
620 .. code-block:: c++
623 return Err; // Failure value - move error to caller.
630 .. code-block:: c++
639 .. code-block:: c++
664 .. code-block:: c++
683 into a non-exhaustive list, risking unexpected program termination. Where
708 .. code-block:: c++
717 .. code-block:: c++
731 .. code-block:: c++
753 .. code-block:: c++
772 .. code-block:: c++
780 // Original error can be inspected, then re-wrapped and returned (or a new
796 written in straight-line style, as long as each fallible call is wrapped in a
803 .. code-block:: c++
808 turning them into non-failing calls:
810 .. code-block:: c++
825 .. code-block:: c++
851 .. code-block:: c++
866 is encountered. In release builds the behavior of cantFail for failure values is
872 likely to be of more use in tool and unit-test code where inputs and/or
873 mocked-up classes or functions may be known to be safe.
884 .. code-block:: c++
917 well-formed Foo or an Error, never an object in an invalid state.
929 .. code-block:: c++
954 .. code-block:: c++
983 this requires considerable boiler-plate for iteration and error checking. We can
987 .. code-block:: c++
990 for (auto &Child : Ar->children(Err)) {
991 // Use Child - only enter the loop when it's valid
1005 natural style, with their ``++`` and ``--`` operators replaced with fallible
1008 .. code-block:: c++
1017 // operator++/operator-- replaced with fallible increment / decrement:
1029 fallible_iterator utility which provides ``operator++`` and ``operator--``,
1034 error as checked throughout the body of a range-based for loop), enabling early
1041 .. code-block:: c++
1070 --------------------------------------------
1076 .. code-block:: c++
1088 .. code-block:: c++
1099 (`doxygen <https://llvm.org/doxygen/classllvm_1_1function__ref_3_01Ret_07Params_8_8_8_08_4.html>`__) class
1111 .. code-block:: c++
1121 .. code-block:: c++
1137 The ``LLVM_DEBUG()`` macro and ``-debug`` option
1138 ------------------------------------------------
1148 The ``llvm/Support/Debug.h`` (`doxygen
1149 <https://llvm.org/doxygen/Debug_8h_source.html>`__) file provides a macro named
1152 executed if '``opt``' (or any other tool) is run with the '``-debug``' command
1155 .. code-block:: c++
1161 .. code-block:: none
1163 $ opt < a.bc > /dev/null -mypass
1165 $ opt < a.bc > /dev/null -mypass -debug
1168 Using the ``LLVM_DEBUG()`` macro instead of a home-brewed solution allows you to not
1170 pass. Note that ``LLVM_DEBUG()`` macros are disabled for non-asserts builds, so they
1172 not contain side-effects!).
1177 been started yet, you can always just run it with ``-debug``.
1181 Fine grained debug info with ``DEBUG_TYPE`` and the ``-debug-only`` option
1184 Sometimes you may find yourself in a situation where enabling ``-debug`` just
1186 If you want to enable debug information with more fine-grained control, you
1187 should define the ``DEBUG_TYPE`` macro and use the ``-debug-only`` option as
1190 .. code-block:: c++
1201 .. code-block:: none
1203 $ opt < a.bc > /dev/null -mypass
1205 $ opt < a.bc > /dev/null -mypass -debug
1208 $ opt < a.bc > /dev/null -mypass -debug-only=foo
1210 $ opt < a.bc > /dev/null -mypass -debug-only=bar
1212 $ opt < a.bc > /dev/null -mypass -debug-only=foo,bar
1223 enabled with ``-debug-only=InstrSched``, even if the source lives in multiple
1225 arguments of the ``-debug-only`` option.
1227 For performance reasons, -debug-only is not available in optimized build
1228 (``--enable-optimized``) of LLVM.
1235 .. code-block:: c++
1242 The ``Statistic`` class & ``-stats`` option
1243 -------------------------------------------
1245 The ``llvm/ADT/Statistic.h`` (`doxygen
1246 <https://llvm.org/doxygen/Statistic_8h_source.html>`__) file provides a class
1254 hand inspection, or some ad-hoc method, this is a real pain and not very useful
1264 .. code-block:: c++
1276 .. code-block:: c++
1281 gathered, use the '``-stats``' option:
1283 .. code-block:: none
1285 $ opt -stats -mypassname < program.bc > /dev/null
1288 Note that in order to use the '``-stats``' option, LLVM must be
1294 .. code-block:: none
1296 7646 bitcodewriter - Number of normal instructions
1297 725 bitcodewriter - Number of oversized instructions
1298 129996 bitcodewriter - Number of bitcode bytes written
1299 2817 raise - Number of insts DCEd or constprop'd
1300 3213 raise - Number of cast-of-self removed
1301 5046 raise - Number of expression trees converted
1302 75 raise - Number of other getelementptr's formed
1303 138 raise - Number of load/store peepholes
1304 42 deadtypeelim - Number of unused typenames removed from symtab
1305 392 funcresolve - Number of varargs functions resolved
1306 27 globaldce - Number of global variables removed
1307 2 adce - Number of basic blocks removed
1308 134 cee - Number of branches revectored
1309 49 cee - Number of setcc instruction eliminated
1310 532 gcse - Number of loads removed
1311 2919 gcse - Number of instructions removed
1312 86 indvars - Number of canonical indvars added
1313 87 indvars - Number of aux indvars removed
1314 25 instcombine - Number of dead inst eliminate
1315 434 instcombine - Number of insts combined
1316 248 licm - Number of load insts hoisted
1317 1298 licm - Number of insts hoisted to a loop pre-header
1318 3 licm - Number of insts hoisted to multiple loop preds (bad, no loop pre-header)
1319 75 mem2reg - Number of alloca's promoted
1320 1444 cfgsimplify - Number of blocks simplified
1329 ---------------------------------------------------
1340 The ``llvm/Support/DebugCounter.h`` (`doxygen
1341 <https://llvm.org/doxygen/DebugCounter_8h_source.html>`__) file
1347 .. code-block:: c++
1349 DEBUG_COUNTER(DeleteAnInstruction, "passname-delete-instruction",
1360 .. code-block:: c++
1363 I->eraseFromParent();
1366 the '``--debug-counter``' Options. To specify when to execute the codepath.
1368 .. code-block:: none
1370 $ opt --debug-counter=passname-delete-instruction=2-3 -passname
1376 .. code-block:: llvm
1385 A utility is provided in `utils/bisect-skip-count` to binary search
1387 range for a debug-counter variable.
1389 A more general utility is provided in `llvm/tools/reduce-chunk-list/reduce-chunk-list.cpp` to minimize debug counter chunks lists.
1391 How to use reduce-chunk-list:
1393 To do so, run the compilation command causing you want to minimize with `-print-debug-counter` adding a `-mllvm` if needed.
1396 .. code-block:: none
1398 my-counter : {5678,empty}
1400 The number of calls to `my-counter` is 5678
1402 Than Find the minimum set of chunks that is interesting, with `reduce-chunk-list`.
1405 .. code-block:: bash
1408 opt -debug-counter=my-counter=$1
1411 Than run `reduce-chunk-list my-script.sh 0-5678 2>&1 | tee dump_bisect`
1413 but when it is done, it will print the result like: `Minimal Chunks = 0:1:5:11-12:33-34`
1418 -----------------------------------
1457 Note that graph visualization features are compiled out of Release builds to
1458 reduce file size. This means that you need a Debug+Asserts or Release+Asserts
1467 commonly use STL data structures. This section describes the trade-offs you
1471 container, a set-like container, or a map-like container? The most important
1476 * a :ref:`map-like <ds_map>` container if you need efficient look-up of a
1477 value based on another value. Map-like containers also support efficient
1478 queries for containment (whether a key is in the map). Map-like containers
1480 need that, use two maps. Some map-like containers also support efficient
1481 iteration through the keys in sorted order. Map-like containers are the most
1484 * a :ref:`set-like <ds_set>` container if you need to put a bunch of stuff into
1485 a container that automatically eliminates duplicates. Some set-like
1487 Set-like containers are more expensive than sequential containers.
1492 efficient look-up based on a key.
1514 ---------------------------------------------------
1550 destructors will be run for every element in the array (re-sizable vectors only
1588 In the absence of a well-motivated choice for the number of
1600 #. std::vector is exception-safe, and some implementations have pessimizations
1608 #. SmallVector with N equal to 0 is smaller than std::vector on 64-bit
1624 .. code-block:: c++
1661 they are sparsely used. This utility uses page-granular lazy initialization
1684 non-ordered manner.
1698 .. code-block:: c++
1707 .. code-block:: c++
1755 ``ilist<T>`` implements an 'intrusive' doubly-linked list. It is intrusive,
1763 list, and ``ilist``\ s are guaranteed to support a constant-time splice
1786 value. Apart from the standard operations of a vector-like container, it can
1791 .. code-block:: c++
1838 ``operator--`` must work correctly on the ``end`` iterator in the case of
1839 non-empty ``ilist``\ s.
1841 The only sensible solution to this problem is to allocate a so-called *sentinel*
1843 the back-link to the last element. However conforming to the C++ convention it
1849 ``ilist_traits<T>``. By default a ``T`` gets heap-allocated whenever the need
1856 ``T``-sentinels, sometimes a trick is employed, leading to *ghostly sentinels*.
1858 Ghostly sentinels are obtained by specially-crafted ``ilist_traits<T>`` which
1862 as the back-link of the sentinel. This is the only field in the ghostly
1878 String-like containers
1879 ----------------------
1927 #. StringRef's do not allow you to mutate the pointed-to string bytes and it
1948 .. code-block:: c++
1964 .. code-block:: c++
1992 as the member of a frequently-allocated heap data structure or returned
1993 by-value.
2002 so it can be embedded into heap data structures and returned by-value. On the
2016 Set-Like Containers (std::set, SmallSet, SetVector, etc)
2017 --------------------------------------------------------
2019 Set-like containers are useful when you need to canonicalize multiple values
2021 this, providing various trade-offs.
2046 If you have a set-like data structure that is usually small and whose elements
2086 need to call ``i->getKey()`` to access the item of the StringSet.) On the
2087 other hand, ``StringSet`` doesn't support range-insertion and
2088 copy-construction, which :ref:`SmallSet <dss_smallset>` and :ref:`SmallPtrSet
2130 data structures (e.g. vector-of-vectors, map-of-vectors). It is not intended for
2139 expensive-to-create or polymorphic objects. It is a combination of a chained
2168 ``std::set`` is a reasonable all-around set class, which is decent at many
2171 per element in the set (thus adding a large amount of per-element space
2190 set-like container along with a :ref:`Sequential Container <ds_sequential>` The
2193 inserting elements into both a set-like container and the sequential container,
2194 using the set-like container for uniquing and the sequential container for
2200 are non-deterministic (e.g. vary across runs of the program on different
2201 machines), iterating over the pointers in the set will not be in a well-defined
2205 set and has the sum of constant factors from the set-like container and the
2248 Other Set-Like Container Options
2262 Map-Like Containers (std::map, DenseMap, etc)
2263 ---------------------------------------------
2265 Map-like containers are useful when you want to associate data to a key. As
2273 If your usage pattern follows a strict insert-then-query approach, you can
2274 trivially use the same approach as :ref:`sorted vectors for set-like containers
2291 The StringMap implementation uses a quadratically-probed hash table, where the
2324 have a dense mapping that is offset by a compile-time constant (the first
2415 order, making it an easy (but somewhat expensive) solution for non-deterministic
2430 integers. Initially, each integer in the range 0..n-1 has its own equivalence
2436 integer 0..n-1 maps to an equivalence class number in the range 0..m-1, where m
2454 Other Map-Like Container Options
2468 ------------------------------------------------------------------------
2544 (`doxygen <https://llvm.org/doxygen/STLExtras_8h.html>`__). Some of these wrap
2545 well-known C++ standard library functions, while others are unique to LLVM.
2550 ---------------------
2564 .. code-block:: c++
2578 .. code-block:: c++
2586 * ``zip_equal`` -- requires all input ranges have the same length.
2587 * ``zip`` -- iteration stops when the end of the shortest range is reached.
2588 * ``zip_first`` -- requires the first range is the shortest one.
2589 * ``zip_longest`` -- iteration continues until the end of the longest range is
2590 reached. The non-existent elements of shorter ranges are replaced with
2598 this same-length assumption and has the best (release-mode) runtime performance.
2608 .. code-block:: c++
2610 for (auto [Idx, BB, Value] : enumerate(Phi->blocks(),
2611 Phi->incoming_values()))
2612 errs() << "#" << Idx << " " << BB->getName() << ": " << *Value << "\n";
2618 .. code-block:: c++
2636 <https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html>`__ are
2640 source /path/to/llvm/src/utils/gdb-scripts/prettyprinters.py
2643 <http://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_57.html>`__ option to
2655 Because this is a "how-to" section, you should also read about the main classes
2663 ---------------------------------------
2691 .. code-block:: c++
2709 .. code-block:: c++
2731 ``llvm/IR/InstIterator.h`` (`doxygen
2732 <https://llvm.org/doxygen/InstIterator_8h.html>`__) and then instantiate
2736 .. code-block:: c++
2749 .. code-block:: c++
2762 Turning an iterator into a class pointer (and vice-versa)
2767 pointer from an iterator is very straight-forward. Assuming that ``i`` is a
2770 .. code-block:: c++
2782 .. code-block:: c++
2787 if (it != inst->getParent()->end()) errs() << *it << "\n";
2799 straight-forward manner, but this example will allow us to explore how you'd do
2800 it if you didn't have ``InstVisitor`` around. In pseudo-code, this is what we
2803 .. code-block:: none
2813 ``FunctionPass``-derived class simply has to override the ``runOnFunction``
2816 .. code-block:: c++
2831 if (CB->getCalledFunction() == targetFunc)
2844 Iterating over def-use & use-def chains
2847 Frequently, we might have an instance of the ``Value`` class (`doxygen
2848 <https://llvm.org/doxygen/classllvm_1_1Value.html>`__) and we want to determine
2850 ``Value`` is called a *def-use* chain. For example, let's say we have a
2852 instructions that *use* ``foo`` is as simple as iterating over the *def-use*
2855 .. code-block:: c++
2859 for (User *U : F->users()) {
2865 Alternatively, it's common to have an instance of the ``User`` Class (`doxygen
2866 <https://llvm.org/doxygen/classllvm_1_1User.html>`__) and need to know what
2868 known as a *use-def* chain. Instances of class ``Instruction`` are common
2872 .. code-block:: c++
2876 for (Use &U : pi->operands()) {
2898 .. code-block:: c++
2912 ---------------------
2926 Creation of ``Instruction``\ s is straight-forward: simply call the constructor
2928 For example, an ``AllocaInst`` only *requires* a (const-ptr-to) ``Type``. Thus:
2930 .. code-block:: c++
2937 instruction, so refer to the `doxygen documentation for the subclass of
2938 Instruction <https://llvm.org/doxygen/classllvm_1_1Instruction.html>`_ that
2955 .. code-block:: c++
2970 and a newly-created instruction we wish to insert before ``*pi``, we do the
2973 .. code-block:: c++
2979 newInst->insertBefore(pi); // Inserts newInst before pi
2982 class and ``Instruction``-derived classes provide constructors which take a
2986 .. code-block:: c++
2991 newInst->insertInto(pb, pb->end()); // Appends newInst to pb
2995 .. code-block:: c++
3016 .. code-block:: c++
3027 .. code-block:: c++
3044 BasicBlock_ is very straight-forward: just call the instruction's
3047 .. code-block:: c++
3050 I->eraseFromParent();
3065 <https://llvm.org/doxygen/BasicBlockUtils_8h_source.html>`_" permits use of two
3081 .. code-block:: c++
3096 .. code-block:: c++
3101 ReplaceInstWithInst(instToReplace->getParent(), ii,
3109 change more than one use at a time. See the doxygen documentation for the
3110 `Value Class <https://llvm.org/doxygen/classllvm_1_1Value.html>`_ and `User Class
3111 <https://llvm.org/doxygen/classllvm_1_1User.html>`_, respectively, for more
3124 .. code-block:: c++
3128 GV->eraseFromParent();
3146 Note that, on Unix-like platforms, LLVM requires the presence of GCC's atomic
3148 multithreading-capable LLVM on a platform without a suitably modern system
3149 compiler, consider compiling LLVM and LLVM-GCC in single-threaded mode, and
3156 -----------------------------------------
3164 ------------------------------------------
3168 single-threaded environment, it implements a simple lazy initialization scheme.
3169 When LLVM is compiled with support for multi-threading, however, it uses
3170 double-checked locking to implement thread-safe lazy initialization.
3175 ----------------------------------------
3179 address space. For instance, in a hypothetical compile-server, the compilation
3187 in-memory IR belongs to an ``LLVMContext``. Entities in different contexts
3204 -------------------
3219 after a function is lazily-jitted. It's still possible to use the lazy JIT in a
3236 ------------------------------
3238 The ``ValueSymbolTable`` (`doxygen
3239 <https://llvm.org/doxygen/classllvm_1_1ValueSymbolTable.html>`__) class provides
3258 -----------------------------------------------------
3260 The ``User`` (`doxygen <https://llvm.org/doxygen/classllvm_1_1User.html>`__)
3262 `Value instance <https://llvm.org/doxygen/classllvm_1_1Value.html>`_\ s. The
3263 ``Use`` (`doxygen <https://llvm.org/doxygen/classllvm_1_1Use.html>`__) helper
3273 refer to them out-of-line by means of a pointer. A mixed variant (some ``Use``
3301 .. code-block:: none
3303 ...---.---.---.---.-------...
3305 '''---'---'---'---'-------'''
3309 .. code-block:: none
3311 .-------...
3313 '-------'''
3316 .---.---.---.---...
3318 '---'---'---'---'''
3326 -----------------------------------------------------
3339 implementation strategy forces an **"is-a"** relationship to exist that is not
3346 generic programming (sometimes called "compile-time duck typing" or "static
3354 called *concept-based polymorphism*. This pattern emulates the interfaces and
3361 <https://learn.microsoft.com/en-us/shows/goingnative-2013/inheritance-base-class-of-evil>`_
3362 - The GoingNative 2013 talk describing this technique, and probably the best
3364 #. `Value Semantics and Concepts-based Polymorphism
3365 <http://www.youtube.com/watch?v=_BpMYeUFXv8>`_ - The C++Now! 2012 talk
3368 <https://sean-parent.stlab.cc/papers-and-presentations>`_
3369 - Links to slides, videos, and sometimes code.
3372 dispatch) and using templates or concepts-based polymorphism, consider whether
3384 types, and leverages the closed and tag-dispatched nature of its hierarchies to
3386 amount of our usage of type hierarchies fits better with tag-based pattern
3396 -------------------
3399 preprocessor symbol `LLVM_ENABLE_ABI_BREAKING_CHECKS` -- LLVM
3404 default -Asserts build. Clients that want ABI compatibility
3405 between +Asserts and -Asserts builds should use the CMake build system
3416 header source: `Type.h <https://llvm.org/doxygen/Type_8h_source.html>`_
3418 doxygen info: `Type Classes <https://llvm.org/doxygen/classllvm_1_1Type.html>`_
3429 --------------------------------
3516 --------------------
3520 header source: `Module.h <https://llvm.org/doxygen/Module_8h_source.html>`_
3522 doxygen info: `Module Class <https://llvm.org/doxygen/classllvm_1_1Module.html>`_
3542 * | ``Module::iterator`` - Typedef for function list iterator
3543 | ``Module::const_iterator`` - Typedef for const_iterator.
3555 ----------------
3557 * | ``Module::global_iterator`` - Typedef for global variable list iterator
3558 | ``Module::const_global_iterator`` - Typedef for const_iterator.
3559 | ``Module::insertGlobalVariable()`` - Inserts a global variable to the list.
3560 | ``Module::removeGlobalVariable()`` - Removes a global variable from the list.
3561 | ``Module::eraseGlobalVariable()`` - Removes a global variable from the list and deletes it.
3567 ----------------
3573 ----------------
3606 -------------------
3610 header source: `Value.h <https://llvm.org/doxygen/Value_8h_source.html>`_
3612 doxygen info: `Value Class <https://llvm.org/doxygen/classllvm_1_1Value.html>`_
3626 This use list is how LLVM represents def-use information in the program, and is
3634 .. code-block:: llvm
3658 * | ``Value::use_iterator`` - Typedef for iterator over the use-list
3659 | ``Value::const_use_iterator`` - Typedef for const_iterator over the
3660 use-list
3661 | ``unsigned use_size()`` - Returns the number of users of the value.
3662 | ``bool use_empty()`` - Returns true if there are no users.
3663 | ``use_iterator use_begin()`` - Get an iterator to the start of the
3664 use-list.
3665 | ``use_iterator use_end()`` - Get an iterator to the end of the use-list.
3666 | ``User *use_back()`` - Returns the last element in the list.
3668 These methods are the interface to access the def-use information in LLVM.
3690 .. code-block:: c++
3692 Inst->replaceAllUsesWith(ConstVal);
3697 ------------------
3701 header source: `User.h <https://llvm.org/doxygen/User_8h_source.html>`_
3703 doxygen info: `User Class <https://llvm.org/doxygen/classllvm_1_1User.html>`_
3715 provides the use-def information in LLVM.
3731 * | ``User::op_iterator`` - Typedef for iterator over the operand list
3732 | ``op_iterator op_begin()`` - Get an iterator to the start of the operand
3734 | ``op_iterator op_end()`` - Get an iterator to the end of the operand list.
3743 -------------------------
3748 <https://llvm.org/doxygen/Instruction_8h_source.html>`_
3750 doxygen info: `Instruction Class
3751 <https://llvm.org/doxygen/classllvm_1_1Instruction.html>`_
3766 file. This file contains some meta-data about the various different types of
3769 concrete sub-classes of ``Instruction`` that implement the instruction (for
3771 file confuses doxygen, so these enum values don't show up correctly in the
3772 `doxygen output <https://llvm.org/doxygen/classllvm_1_1Instruction.html>`_.
3828 -------------------------------------
3884 -------------------------
3889 <https://llvm.org/doxygen/GlobalValue_8h_source.html>`_
3891 doxygen info: `GlobalValue Class
3892 <https://llvm.org/doxygen/classllvm_1_1GlobalValue.html>`_
3943 ----------------------
3947 header source: `Function.h <https://llvm.org/doxygen/Function_8h_source.html>`_
3949 doxygen info: `Function Class
3950 <https://llvm.org/doxygen/classllvm_1_1Function.html>`_
4006 * | ``Function::iterator`` - Typedef for basic block list iterator
4007 | ``Function::const_iterator`` - Typedef for const_iterator.
4014 * | ``Function::arg_iterator`` - Typedef for the argument list iterator
4015 | ``Function::const_arg_iterator`` - Typedef for const_iterator.
4046 ----------------------------
4051 <https://llvm.org/doxygen/GlobalVariable_8h_source.html>`_
4053 doxygen info: `GlobalVariable Class
4054 <https://llvm.org/doxygen/classllvm_1_1GlobalVariable.html>`_
4104 ------------------------
4109 <https://llvm.org/doxygen/BasicBlock_8h_source.html>`_
4111 doxygen info: `BasicBlock Class
4112 <https://llvm.org/doxygen/classllvm_1_1BasicBlock.html>`_
4145 * | ``BasicBlock::iterator`` - Typedef for instruction list iterator
4146 | ``BasicBlock::const_iterator`` - Typedef for const_iterator.
4149 STL-style functions for accessing the instruction list.
4170 ----------------------