• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/CodeGen/

Lines Matching refs:SafeStack

1 //===- SafeStack.cpp - Safe Stack Insertion -------------------------------===//
13 // http://clang.llvm.org/docs/SafeStack.html
124 /// The SafeStack pass splits the stack of each function into the safe
129 class SafeStack {
211 SafeStack(Function &F, const TargetLoweringBase &TL, const DataLayout &DL,
224 uint64_t SafeStack::getStaticAllocaAllocationSize(const AllocaInst* AI) {
235 bool SafeStack::IsAccessSafe(Value *Addr, uint64_t AccessSize,
250 dbgs() << "[SafeStack] "
264 bool SafeStack::IsMemIntrinsicSafe(const MemIntrinsic *MI, const Use &U,
284 bool SafeStack::IsSafeStackAlloca(const Value *AllocaPtr, uint64_t AllocaSize) {
313 << "[SafeStack] Unsafe alloca: " << *AllocaPtr
337 << "[SafeStack] Unsafe alloca: " << *AllocaPtr
356 LLVM_DEBUG(dbgs() << "[SafeStack] Unsafe alloca: " << *AllocaPtr
374 Value *SafeStack::getStackGuard(IRBuilder<> &IRB, Function &F) {
382 void SafeStack::findInsts(Function &F,
432 SafeStack::createStackRestorePoints(IRBuilder<> &IRB, Function &F,
468 void SafeStack::checkStackGuard(IRBuilder<> &IRB, Function &F, ReturnInst &RI,
491 Value *SafeStack::moveStaticAllocasToUnsafeStack(
652 void SafeStack::moveDynamicAllocasToUnsafeStack(
722 bool SafeStack::ShouldInlinePointerAddress(CallInst &CI) {
733 void SafeStack::TryInlinePointerAddress() {
752 bool SafeStack::run() {
753 assert(F.hasFnAttribute(Attribute::SafeStack) &&
754 "Can't run SafeStack on a function without the attribute");
755 assert(!F.isDeclaration() && "Can't run SafeStack on a function declaration");
848 LLVM_DEBUG(dbgs() << "[SafeStack] safestack applied\n");
869 LLVM_DEBUG(dbgs() << "[SafeStack] Function: " << F.getName() << "\n");
871 if (!F.hasFnAttribute(Attribute::SafeStack)) {
872 LLVM_DEBUG(dbgs() << "[SafeStack] safestack is not requested"
878 LLVM_DEBUG(dbgs() << "[SafeStack] function definition"
895 // In the backend pipeline, nothing preserves DT before SafeStack, so we
903 return SafeStack(F, *TL, *DL, SE).run();