From f6773a318f0610e152730c3e39c94dab386830bb Mon Sep 17 00:00:00 2001 From: Vsevolod Livinskiy Date: Wed, 27 Jan 2016 15:54:40 +0300 Subject: [PATCH] Add no-frame-pointer-elim attribute to all functions --- func.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/func.cpp b/func.cpp index 9e689b23..2fb6b73b 100644 --- a/func.cpp +++ b/func.cpp @@ -248,6 +248,11 @@ Function::emitCode(FunctionEmitContext *ctx, llvm::Function *function, maskSymbol->pos = firstStmtPos; ctx->EmitVariableDebugInfo(maskSymbol); +#if ISPC_LLVM_VERSION >= ISPC_LLVM_3_7 // LLVM 3.7+ + if (g->NoOmitFramePointer) + function->addFnAttr("no-frame-pointer-elim", "true"); +#endif + #if 0 llvm::BasicBlock *entryBBlock = ctx->GetCurrentBasicBlock(); #endif