Lines Matching defs:SafeStack

1 //===- SafeStack.cpp - Safe Stack Insertion -------------------------------===//
13 // http://clang.llvm.org/docs/SafeStack.html
120 /// The SafeStack pass splits the stack of each function into the safe
125 class SafeStack {
207 SafeStack(Function &F, const TargetLoweringBase &TL, const DataLayout &DL,
220 uint64_t SafeStack::getStaticAllocaAllocationSize(const AllocaInst* AI) {
231 bool SafeStack::IsAccessSafe(Value *Addr, uint64_t AccessSize,
246 dbgs() << "[SafeStack] "
260 bool SafeStack::IsMemIntrinsicSafe(const MemIntrinsic *MI, const Use &U,
280 bool SafeStack::IsSafeStackAlloca(const Value *AllocaPtr, uint64_t AllocaSize) {
309 << "[SafeStack] Unsafe alloca: " << *AllocaPtr
333 << "[SafeStack] Unsafe alloca: " << *AllocaPtr
352 LLVM_DEBUG(dbgs() << "[SafeStack] Unsafe alloca: " << *AllocaPtr
370 Value *SafeStack::getStackGuard(IRBuilder<> &IRB, Function &F) {
378 void SafeStack::findInsts(Function &F,
428 SafeStack::createStackRestorePoints(IRBuilder<> &IRB, Function &F,
464 void SafeStack::checkStackGuard(IRBuilder<> &IRB, Function &F, ReturnInst &RI,
487 Value *SafeStack::moveStaticAllocasToUnsafeStack(
639 void SafeStack::moveDynamicAllocasToUnsafeStack(
709 bool SafeStack::ShouldInlinePointerAddress(CallSite &CS) {
719 void SafeStack::TryInlinePointerAddress() {
738 bool SafeStack::run() {
739 assert(F.hasFnAttribute(Attribute::SafeStack) &&
740 "Can't run SafeStack on a function without the attribute");
741 assert(!F.isDeclaration() && "Can't run SafeStack on a function declaration");
834 LLVM_DEBUG(dbgs() << "[SafeStack] safestack applied\n");
855 LLVM_DEBUG(dbgs() << "[SafeStack] Function: " << F.getName() << "\n");
857 if (!F.hasFnAttribute(Attribute::SafeStack)) {
858 LLVM_DEBUG(dbgs() << "[SafeStack] safestack is not requested"
864 LLVM_DEBUG(dbgs() << "[SafeStack] function definition"
881 // In the backend pipeline, nothing preserves DT before SafeStack, so we
889 return SafeStack(F, *TL, *DL, SE).run();