This can be done as an attribute on the llvm::Function: `function->setFnAttr("frame-pointer", "all");`