19#ifndef LLVM_ANALYSIS_PHIVALUES_H
20#define LLVM_ANALYSIS_PHIVALUES_H
75 unsigned int NextDepthNumber = 1;
90 class PhiValuesCallbackVH final :
public CallbackVH {
92 void deleted()
override;
93 void allUsesReplacedWith(
Value *New)
override;
101 DenseSet<PhiValuesCallbackVH, DenseMapInfo<Value *>> TrackedValues;
108 void processPhi(
const PHINode *PN, SmallVectorImpl<const PHINode *> &Stack);
140 std::unique_ptr<PhiValues> Result;
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
This header defines various interfaces for pass management in LLVM.
This file implements a set that has insertion order iteration characteristics.
API to communicate dependencies between analyses during invalidation.
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
Value handle with callbacks on RAUW and destruction.
FunctionPass class - This class is used to implement most global optimizations.
The analysis pass which yields a PhiValues.
PhiValues run(Function &F, FunctionAnalysisManager &)
A pass for printing the PhiValues for a function.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
PhiValuesPrinterPass(raw_ostream &OS)
Wrapper pass for the legacy pass manager.
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
const PhiValues & getResult() const
Class for calculating and caching the underlying values of phis in a function.
void invalidateValue(const Value *V)
Notify PhiValues that the cached information using V is no longer valid.
const ValueSet & getValuesForPhi(const PHINode *PN)
Get the underlying values of a phi.
SmallSetVector< Value *, 4 > ValueSet
bool invalidate(Function &, const PreservedAnalyses &, FunctionAnalysisManager::Invalidator &)
Handle invalidation events in the new pass manager.
void releaseMemory()
Free the memory used by this class.
void print(raw_ostream &OS) const
Print out the values currently in the cache.
PhiValues(const Function &F)
Construct an empty PhiValues.
A set of analyses that are preserved following a run of a transformation pass.
A SetVector that performs no allocations if smaller than a certain size.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
A CRTP mix-in to automatically provide informational APIs needed for passes.