|
LLVM
10.0.0
|
Compute the layout of an unsafe stack frame. More...
#include "CodeGen/SafeStackLayout.h"
Public Member Functions | |
| StackLayout (unsigned StackAlignment) | |
| void | addObject (const Value *V, unsigned Size, unsigned Alignment, const StackColoring::LiveRange &Range) |
| Add an object to the stack frame. More... | |
| void | computeLayout () |
| Run the layout computation for all previously added objects. More... | |
| unsigned | getObjectOffset (const Value *V) |
| Returns the offset to the object start in the stack frame. More... | |
| unsigned | getObjectAlignment (const Value *V) |
| Returns the alignment of the object. More... | |
| unsigned | getFrameSize () |
| Returns the size of the entire frame. More... | |
| unsigned | getFrameAlignment () |
| Returns the alignment of the frame. More... | |
| void | print (raw_ostream &OS) |
Compute the layout of an unsafe stack frame.
Definition at line 24 of file SafeStackLayout.h.
|
inline |
Definition at line 54 of file SafeStackLayout.h.
References addObject(), computeLayout(), and Size.
| void StackLayout::addObject | ( | const Value * | V, |
| unsigned | Size, | ||
| unsigned | Alignment, | ||
| const StackColoring::LiveRange & | Range | ||
| ) |
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.
Definition at line 41 of file SafeStackLayout.cpp.
References llvm::max(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and Size.
Referenced by StackLayout().
| void StackLayout::computeLayout | ( | ) |
Run the layout computation for all previously added objects.
Definition at line 136 of file SafeStackLayout.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::dbgs(), llvm::SmallVectorTemplateCommon< T, typename >::end(), LLVM_DEBUG, print(), llvm::SmallVectorBase::size(), and llvm::stable_sort().
Referenced by StackLayout().
|
inline |
Returns the alignment of the frame.
Definition at line 74 of file SafeStackLayout.h.
References print().
|
inline |
Returns the size of the entire frame.
Definition at line 71 of file SafeStackLayout.h.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), and llvm::SmallVectorBase::empty().
Returns the alignment of the object.
Definition at line 68 of file SafeStackLayout.h.
Returns the offset to the object start in the stack frame.
Definition at line 65 of file SafeStackLayout.h.
| LLVM_DUMP_METHOD void StackLayout::print | ( | raw_ostream & | OS | ) |
Definition at line 29 of file SafeStackLayout.cpp.
References IT, and llvm::SmallVectorBase::size().
Referenced by computeLayout(), and getFrameAlignment().
1.8.13