LLVM  4.0.0
Classes | Public Member Functions | List of all members
llvm::safestack::StackColoring Class Reference

Compute live ranges of allocas. More...

#include <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 LiveRangegetLiveRange (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...
 

Detailed Description

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 31 of file SafeStackColoring.h.

Constructor & Destructor Documentation

llvm::safestack::StackColoring::StackColoring ( Function F,
ArrayRef< AllocaInst * >  Allocas 
)
inline

Definition at line 103 of file SafeStackColoring.h.

Member Function Documentation

LiveRange llvm::safestack::StackColoring::getFullLiveRange ( )
inline

Returns a live range that represents an alloca that is live throughout the entire function.

Definition at line 116 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 27 of file SafeStackColoring.cpp.

References assert(), and IT().

bool StackColoring::removeAllMarkers ( )
void StackColoring::run ( )

Definition at line 266 of file SafeStackColoring.cpp.

References ClColoring, DEBUG, getFullLiveRange(), I, and llvm::BitVector::test().


The documentation for this class was generated from the following files: