• Home
  • Raw
  • Download

Lines Matching +full:helper +full:- +full:hoist +full:- +full:variables

14 different ways of classifying them: flow-sensitive vs. flow-insensitive,
15 context-sensitive vs. context-insensitive, field-sensitive
16 vs. field-insensitive, unification-based vs. subset-based, etc. Traditionally,
27 are assumed to be flow-insensitive). In addition to simple alias analysis
49 ``AliasAnalysis`` interface also exposes some helper methods which allow you to
57 --------------------------
69 .. code-block:: c++
77 C[1] = A[9-i]; /* One byte store */
86 .. code-block:: c++
94 C[1] = A[9-i]; /* One byte store */
105 --------------------
123 non-overlapping memory ranges. Another is when the two pointers are only ever
125 between accesses through one pointer and accesses through the other --- in this
142 -----------------------------
158 --------------------------------------
168 (functions, constant global variables, and the null pointer). This information
181 side-effect free and only depend on their input arguments, allowing them to be
187 that (at most) the function only reads from non-volatile memory. Functions with
188 this property are side-effect free, only depending on their input arguments and
197 Writing a new alias analysis implementation for LLVM is quite straight-forward.
203 ---------------------
211 #. If you are a function-local analysis, subclass ``FunctionPass``.
219 -----------------------------
228 .. code-block:: c++
240 .. code-block:: c++
249 ----------------------------
254 .. code-block:: c++
263 ---------------------------------
267 default to providing :ref:`chaining <aliasanalysis-chaining>` to another alias
273 .. _aliasanalysis-chaining:
276 -----------------------------------
278 With only one special exception (the :ref:`-no-aa <aliasanalysis-no-aa>` pass)
280 example, the user can specify "``-basicaa -ds-aa -licm``" to get the maximum
286 .. code-block:: c++
294 // Couldn't determine a must or no-alias result.
305 ---------------------------------------------
315 their internal data structures are kept up-to-date as the program changes (for
340 This method is a simple helper method that is provided to make clients easier to
362 -----------------
372 -----------
378 to be able to do something like "``opt -my-aa -O2``" and have it use ``-my-aa``
391 ``AliasAnalysisCounter`` (``-count-aa``) are implemented as ``ModulePass``
396 Similarly, the ``opt -p`` option introduces ``ModulePass`` passes between each
417 non-deterministic number of alias queries. This can cause stats collected by
435 -------------------------------------------
437 The ``memdep`` pass uses alias analysis to provide high-level dependence
438 information about memory-using instructions. This will tell you which store
445 -----------------------------------
472 pointer argument is loop-invariant.
478 uses the union-find algorithm to efficiently merge AliasSets when a pointer is
485 these hash-table nodes to avoid having to allocate memory unnecessarily, and to
494 ----------------------------------------------
498 higher-level methods when possible (e.g., use mod/ref information instead of the
513 -------------------------------------------
516 interface. With the exception of the :ref:`-no-aa <aliasanalysis-no-aa>`
517 implementation, all of these :ref:`chain <aliasanalysis-chaining>` to other
520 .. _aliasanalysis-no-aa:
522 The ``-no-aa`` pass
525 The ``-no-aa`` pass is just like what it sounds: an alias analysis that never
529 The ``-basicaa`` pass
532 The ``-basicaa`` pass is an aggressive local analysis that *knows* many
546 The ``-globalsmodref-aa`` pass
549 This pass implements a simple context-sensitive mod/ref and alias analysis for
550 internal global variables that don't "have their address taken". If a global
556 The real power of this pass is that it provides context-sensitive mod/ref
563 This pass is somewhat limited in its scope (only support non-address taken
566 The ``-steens-aa`` pass
569 The ``-steens-aa`` pass implements a variation on the well-known "Steensgaard's
571 unification-based, flow-insensitive, context-insensitive, and field-insensitive
574 The LLVM ``-steens-aa`` pass implements a "speculatively field-**sensitive**"
581 ``-steens-aa`` is available in the optional "poolalloc" module. It is not part
584 The ``-ds-aa`` pass
587 The ``-ds-aa`` pass implements the full Data Structure Analysis algorithm. Data
588 Structure Analysis is a modular unification-based, flow-insensitive,
589 context-**sensitive**, and speculatively field-**sensitive** alias
593 queries, and can provide context-sensitive mod/ref information as well. The
594 only major facility not implemented so far is support for must-alias
599 ``-ds-aa`` is available in the optional "poolalloc" module. It is not part of
602 The ``-scev-aa`` pass
605 The ``-scev-aa`` pass implements AliasAnalysis queries by translating them into
607 ``getelementptr`` instructions and loop induction variables than other alias
611 -------------------------------------
613 LLVM includes several alias-analysis driven transformations which can be used
616 The ``-adce`` pass
619 The ``-adce`` pass, which implements Aggressive Dead Code Elimination uses the
621 side-effects and are not used.
623 The ``-licm`` pass
626 The ``-licm`` pass implements various Loop Invariant Code Motion related
630 * It uses mod/ref information to hoist or sink load instructions out of loops if
633 * It uses mod/ref information to hoist function calls out of loops that do not
634 write to memory and are loop-invariant.
640 The ``-argpromotion`` pass
643 The ``-argpromotion`` pass promotes by-reference arguments to be passed in
644 by-value instead. In particular, if pointer arguments are only loaded from it
650 The ``-gvn``, ``-memcpyopt``, and ``-dse`` passes
658 -------------------------------------------------------
663 .. code-block:: bash
665 % opt -ds-aa -aa-eval foo.bc -disable-output -stats
667 The ``-print-alias-sets`` pass
670 The ``-print-alias-sets`` pass is exposed as part of the ``opt`` tool to print
674 .. code-block:: bash
676 % opt -ds-aa -print-alias-sets -disable-output
678 The ``-count-aa`` pass
681 The ``-count-aa`` pass is useful to see how many queries a particular pass is
684 .. code-block:: bash
686 % opt -basicaa -count-aa -ds-aa -count-aa -licm
689 ``-licm`` pass (of the ``-ds-aa`` pass) and how many queries are made of the
690 ``-basicaa`` pass by the ``-ds-aa`` pass. This can be useful when debugging a
693 The ``-aa-eval`` pass
696 The ``-aa-eval`` pass simply iterates through all pairs of pointers in a
709 intra- or inter-block level. Because of its laziness and caching policy, using