LLVM API Documentation
An immutable pass that tracks .assume intrinsics in a module. More...
#include <AssumptionTracker.h>
Classes | |
class | CallCallbackVH |
class | FunctionCallbackVH |
Public Types | |
typedef CallHandleSet::iterator | assumption_iterator |
typedef iterator_range < assumption_iterator > | assumption_range |
Public Member Functions | |
void | forgetCachedAssumptions (Function *F) |
Remove the cache of .assume intrinsics for the given function. | |
void | registerAssumption (CallInst *CI) |
Add an .assume intrinsic to the cache for its parent function. | |
assumption_range | assumptions (Function *F) |
AssumptionTracker () | |
~AssumptionTracker () | |
void | releaseMemory () override |
void | verifyAnalysis () const override |
bool | doFinalization (Module &) override |
Static Public Attributes | |
static char | ID |
An immutable pass that tracks .assume intrinsics in a module.
Definition at line 31 of file AssumptionTracker.h.
Definition at line 98 of file AssumptionTracker.h.
Definition at line 99 of file AssumptionTracker.h.
Definition at line 104 of file AssumptionTracker.cpp.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeAssumptionTrackerPass().
Definition at line 108 of file AssumptionTracker.cpp.
assumption_range llvm::AssumptionTracker::assumptions | ( | Function * | F | ) | [inline] |
Definition at line 101 of file AssumptionTracker.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), and I.
Referenced by llvm::CodeMetrics::collectEphemeralValues().
bool llvm::AssumptionTracker::doFinalization | ( | Module & | ) | [inline, override, virtual] |
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run.
Reimplemented from llvm::Pass.
Definition at line 118 of file AssumptionTracker.h.
References verifyAnalysis().
void AssumptionTracker::forgetCachedAssumptions | ( | Function * | F | ) |
Remove the cache of .assume intrinsics for the given function.
Definition at line 31 of file AssumptionTracker.cpp.
Referenced by llvm::InlineFunction(), and llvm::UnrollLoop().
void AssumptionTracker::registerAssumption | ( | CallInst * | CI | ) |
Add an .assume intrinsic to the cache for its parent function.
Definition at line 81 of file AssumptionTracker.cpp.
References llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
void llvm::AssumptionTracker::releaseMemory | ( | ) | [inline, override, virtual] |
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused.
Optionally implement this function to release pass memory when it is no longer used.
Reimplemented from llvm::Pass.
Definition at line 113 of file AssumptionTracker.h.
References llvm::DenseMap< KeyT, ValueT, KeyInfoT >::shrink_and_clear().
void AssumptionTracker::verifyAnalysis | ( | ) | const [override, virtual] |
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information.
Reimplemented from llvm::Pass.
Definition at line 65 of file AssumptionTracker.cpp.
References llvm::CallingConv::C, llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
Referenced by doFinalization().
char llvm::AssumptionTracker::ID [static] |
Definition at line 123 of file AssumptionTracker.h.