12#ifndef LLVM_IR_ANALYSIS_H 
   13#define LLVM_IR_ANALYSIS_H 
  120    PA.PreservedIDs.
insert(&AllAnalysesKey);
 
 
  141    NotPreservedAnalysisIDs.erase(
ID);
 
  146      PreservedIDs.insert(
ID);
 
 
  160      PreservedIDs.insert(
ID);
 
 
  184    PreservedIDs.erase(
ID);
 
  185    NotPreservedAnalysisIDs.insert(
ID);
 
 
  202    for (
auto *
ID : Arg.NotPreservedAnalysisIDs) {
 
  203      PreservedIDs.erase(
ID);
 
  204      NotPreservedAnalysisIDs.insert(
ID);
 
  206    PreservedIDs.remove_if(
 
  207        [&](
void *
ID) { 
return !Arg.PreservedIDs.
contains(
ID); });
 
 
  215    if (Arg.areAllPreserved())
 
  218      *
this = std::move(Arg);
 
  223    for (
auto *
ID : Arg.NotPreservedAnalysisIDs) {
 
  224      PreservedIDs.erase(
ID);
 
  225      NotPreservedAnalysisIDs.insert(
ID);
 
  227    PreservedIDs.remove_if(
 
  228        [&](
void *
ID) { 
return !Arg.PreservedIDs.contains(
ID); });
 
 
  233  class PreservedAnalysisChecker {
 
  238    const bool IsAbandoned;
 
  244        : PA(PA), ID(ID), IsAbandoned(PA.NotPreservedAnalysisIDs.
count(ID)) {}
 
  251      return !IsAbandoned && (PA.PreservedIDs.count(&AllAnalysesKey) ||
 
  252                              PA.PreservedIDs.count(ID));
 
 
  265      return !IsAbandoned && (PA.PreservedIDs.count(&AllAnalysesKey) ||
 
  266                              PA.PreservedIDs.count(SetID));
 
 
 
  293    return NotPreservedAnalysisIDs.empty() &&
 
  294           PreservedIDs.count(&AllAnalysesKey);
 
 
  308    return NotPreservedAnalysisIDs.empty() &&
 
  309           (PreservedIDs.count(&AllAnalysesKey) || PreservedIDs.count(SetID));
 
 
 
#define LLVM_TEMPLATE_ABI
 
This file defines the SmallPtrSet class.
 
This templated class represents "all analyses that operate over <aparticular IR unit>" (e....
 
static AnalysisSetKey * ID()
 
Represents analyses that only rely on functions' control flow.
 
static AnalysisSetKey * ID()
 
A Module instance is used to store all the information related to an LLVM module.
 
A checker object that makes it easy to query for whether an analysis or some set covering it is prese...
 
bool preserved()
Returns true if the checker's analysis was not abandoned and either.
 
bool preservedWhenStateless()
Return true if the checker's analysis was not abandoned, i.e.
 
friend class PreservedAnalyses
 
bool preservedSet()
Returns true if the checker's analysis was not abandoned and either.
 
A set of analyses that are preserved following a run of a transformation pass.
 
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
 
bool areAllPreserved() const
Test whether all analyses are preserved (and none are abandoned).
 
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
 
PreservedAnalyses & preserve(AnalysisKey *ID)
Given an analysis's ID, mark the analysis as preserved, adding it to the set.
 
PreservedAnalyses & abandon()
Mark an analysis as abandoned.
 
bool allAnalysesInSetPreserved() const
Directly test whether a set of analyses is preserved.
 
PreservedAnalysisChecker getChecker(AnalysisKey *ID) const
Build a checker for this PreservedAnalyses and the specified analysis ID.
 
PreservedAnalyses & preserveSet()
Mark an analysis set as preserved.
 
void intersect(const PreservedAnalyses &Arg)
Intersect this set with another in place.
 
PreservedAnalyses & preserve()
Mark an analysis as preserved.
 
PreservedAnalyses & abandon(AnalysisKey *ID)
Mark an analysis as abandoned using its ID.
 
void intersect(PreservedAnalyses &&Arg)
Intersect this set with a temporary other set in place.
 
bool allAnalysesInSetPreserved(AnalysisSetKey *SetID) const
Directly test whether a set of analyses is preserved.
 
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
 
PreservedAnalyses & preserveSet(AnalysisSetKey *ID)
Mark an analysis set as preserved using its ID.
 
static PreservedAnalyses allInSet()
Construct a preserved analyses object with a single preserved set.
 
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
 
bool contains(ConstPtrType Ptr) const
 
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
 
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
 
This is an optimization pass for GlobalISel generic memory operations.
 
AnalysisSetKey AllAnalysesOn< IRUnitT >::SetKey
 
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
 
A special type used by analysis passes to provide an address that identifies that particular analysis...
 
A special type used to provide an address that identifies a set of related analyses.