|
LLVM
3.7.0
|
#include "llvm/ADT/IndexedMap.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/SmallSet.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineDominators.h"#include "llvm/CodeGen/MachineFrameInfo.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineLoopInfo.h"#include "llvm/CodeGen/MachineModuleInfo.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/Passes.h"#include "llvm/CodeGen/RegisterScavenging.h"#include "llvm/CodeGen/StackProtector.h"#include "llvm/CodeGen/WinEHFuncInfo.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/IR/InlineAsm.h"#include "llvm/IR/LLVMContext.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Target/TargetFrameLowering.h"#include "llvm/Target/TargetInstrInfo.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Target/TargetRegisterInfo.h"#include "llvm/Target/TargetSubtargetInfo.h"#include <climits>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "pei" |
Typedefs | |
| typedef SmallSetVector< int, 8 > | StackObjSet |
| StackObjSet - A set of stack object indexes. More... | |
Functions | |
| INITIALIZE_PASS_BEGIN (PEI,"prologepilog","Prologue/Epilogue Insertion", false, false) INITIALIZE_PASS_END(PEI | |
| Prologue Epilogue Insertion &Frame false | STATISTIC (NumScavengedRegs,"Number of frame index regs scavenged") |
| STATISTIC (NumBytesStackSpace,"Number of bytes used for stack in all functions") | |
| static void | updateLiveness (MachineFunction &MF) |
| Helper function to update the liveness information for the callee-saved registers. More... | |
| static void | AdjustStackOffset (MachineFrameInfo *MFI, int FrameIdx, bool StackGrowsDown, int64_t &Offset, unsigned &MaxAlign) |
| AdjustStackOffset - Helper function used to adjust the stack frame offset. More... | |
| static void | AssignProtectedObjSet (const StackObjSet &UnassignedObjs, SmallSet< int, 16 > &ProtectedObjs, MachineFrameInfo *MFI, bool StackGrowsDown, int64_t &Offset, unsigned &MaxAlign) |
| AssignProtectedObjSet - Helper function to assign large stack objects (i.e., those required to be close to the Stack Protector) to stack offsets. More... | |
Variables | |
| static cl::opt< unsigned > | WarnStackSize ("warn-stack-size", cl::Hidden, cl::init((unsigned)-1), cl::desc("Warn for stack size bigger than the given"" number")) |
| prologepilog | |
| Prologue Epilogue Insertion &Frame | Finalization |
| Prologue Epilogue Insertion &Frame | false |
| #define DEBUG_TYPE "pei" |
Definition at line 50 of file PrologEpilogInserter.cpp.
| typedef SmallSetVector<int, 8> StackObjSet |
StackObjSet - A set of stack object indexes.
Definition at line 167 of file PrologEpilogInserter.cpp.
|
inlinestatic |
AdjustStackOffset - Helper function used to adjust the stack frame offset.
Definition at line 501 of file PrologEpilogInserter.cpp.
References llvm::dbgs(), DEBUG, llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), and llvm::MachineFrameInfo::setObjectOffset().
Referenced by AssignProtectedObjSet().
|
static |
AssignProtectedObjSet - Helper function to assign large stack objects (i.e., those required to be close to the Stack Protector) to stack offsets.
Definition at line 530 of file PrologEpilogInserter.cpp.
References AdjustStackOffset(), llvm::SetVector< T, Vector, Set >::begin(), llvm::SetVector< T, Vector, Set >::end(), I, and llvm::SmallSet< T, N, C >::insert().
| Prologue Epilogue Insertion& Frame false STATISTIC | ( | NumScavengedRegs | , |
| "Number of frame index regs scavenged" | |||
| ) |
|
static |
Helper function to update the liveness information for the callee-saved registers.
Definition at line 376 of file PrologEpilogInserter.cpp.
References llvm::MachineBasicBlock::addLiveIn(), llvm::SmallVectorBase::empty(), llvm::MachineFunction::front(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), getReg(), llvm::MachineFrameInfo::getRestorePoint(), llvm::MachineFrameInfo::getSavePoint(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::MachineBasicBlock::successors().
| Prologue Epilogue Insertion& Frame false |
Definition at line 114 of file PrologEpilogInserter.cpp.
| Prologue Epilogue Insertion& Frame Finalization |
Definition at line 114 of file PrologEpilogInserter.cpp.
| prologepilog |
Definition at line 114 of file PrologEpilogInserter.cpp.
1.8.6