LLVM
8.0.1
|
Compute live ranges of allocas. More...
#include "CodeGen/SafeStackColoring.h"
Classes | |
struct | LiveRange |
This class represents a set of interesting instructions where an alloca is live. More... | |
Public Member Functions | |
StackColoring (Function &F, ArrayRef< AllocaInst *> Allocas) | |
void | run () |
void | removeAllMarkers () |
const LiveRange & | getLiveRange (AllocaInst *AI) |
Returns a set of "interesting" instructions where the given alloca is live. More... | |
LiveRange | getFullLiveRange () |
Returns a live range that represents an alloca that is live throughout the entire function. More... | |
Compute live ranges of allocas.
Live ranges are represented as sets of "interesting" instructions, which are defined as instructions that may start or end an alloca's lifetime. These are:
Definition at line 38 of file SafeStackColoring.h.
|
inline |
Definition at line 119 of file SafeStackColoring.h.
References getLiveRange(), removeAllMarkers(), and run().
|
inline |
Returns a live range that represents an alloca that is live throughout the entire function.
Definition at line 132 of file SafeStackColoring.h.
References llvm::safestack::StackColoring::LiveRange::AddRange(), assert(), and llvm::safestack::StackColoring::LiveRange::SetMaximum().
Referenced by run().
const StackColoring::LiveRange & StackColoring::getLiveRange | ( | AllocaInst * | AI | ) |
Returns a set of "interesting" instructions where the given alloca is live.
Not all instructions in a function are interesting: we pick a set that is large enough for LiveRange::Overlaps to be correct.
Definition at line 42 of file SafeStackColoring.cpp.
References assert(), I, llvm::Instruction::isLifetimeStartOrEnd(), IT, and llvm::Intrinsic::lifetime_start.
Referenced by StackColoring().
bool StackColoring::removeAllMarkers | ( | ) |
Definition at line 57 of file SafeStackColoring.cpp.
References llvm::dbgs(), llvm::depth_first(), llvm::dyn_cast(), llvm::SmallVectorBase::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::Instruction::eraseFromParent(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::User::getOperand(), I, IT, LLVM_DEBUG, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::predecessors(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::BitVector::reset(), llvm::BitVector::resize(), llvm::BitVector::set(), llvm::BitVector::test(), and llvm::Value::users().
Referenced by StackColoring().
void StackColoring::run | ( | ) |
Definition at line 284 of file SafeStackColoring.cpp.
References ClColoring, getFullLiveRange(), I, LLVM_DEBUG, and llvm::BitVector::test().
Referenced by StackColoring().