class StackLayout

Declaration

class StackLayout { /* full declaration omitted */ };

Description

Compute the layout of an unsafe stack frame.

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:24

Member Variables

private llvm::Align MaxAlignment
private SmallVector< llvm::safestack::StackLayout::StackRegion, 16> Regions
The list of current stack regions, sorted by StackRegion::Start.
private SmallVector< llvm::safestack::StackLayout::StackObject, 8> StackObjects
private DenseMap<const llvm::Value*, unsigned int> ObjectOffsets
private DenseMap<const llvm::Value*, llvm::Align> ObjectAlignments

Method Overview

Methods

StackLayout(llvm::Align StackAlignment)

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:55

Parameters

llvm::Align StackAlignment

void addObject(
    const llvm::Value* V,
    unsigned int Size,
    llvm::Align Alignment,
    const StackLifetime::LiveRange& Range)

Description

Add an object to the stack frame. Value pointer is opaque and used as a handle to retrieve the object's offset in the frame later.

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:59

Parameters

const llvm::Value* V
unsigned int Size
llvm::Align Alignment
const StackLifetime::LiveRange& Range

void computeLayout()

Description

Run the layout computation for all previously added objects.

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:63

llvm::Align getFrameAlignment()

Description

Returns the alignment of the frame.

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:75

unsigned int getFrameSize()

Description

Returns the size of the entire frame.

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:72

llvm::Align getObjectAlignment(
    const llvm::Value* V)

Description

Returns the alignment of the object

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:69

Parameters

const llvm::Value* V

unsigned int getObjectOffset(const llvm::Value* V)

Description

Returns the offset to the object start in the stack frame.

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:66

Parameters

const llvm::Value* V

void layoutObject(
    llvm::safestack::StackLayout::StackObject&
        Obj)

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:52

Parameters

llvm::safestack::StackLayout::StackObject& Obj

void print(llvm::raw_ostream& OS)

Declared at: llvm/lib/CodeGen/SafeStackLayout.h:77

Parameters

llvm::raw_ostream& OS