diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -93,6 +93,11 @@ * ``Callbacks`` have been added to ``CommandLine Options``. These can be used to validate of selectively enable other options. +* The function attributes ``no-frame-pointer-elim`` and + ``no-frame-pointer-elim-non-leaf`` have been replaced by ``frame-pointer``, + which has 3 values: ``none``, ``non-leaf``, and ``all``. The values mean what + functions must retain frame pointers. + Changes to the LLVM IR ---------------------- diff --git a/llvm/lib/CodeGen/TargetOptionsImpl.cpp b/llvm/lib/CodeGen/TargetOptionsImpl.cpp --- a/llvm/lib/CodeGen/TargetOptionsImpl.cpp +++ b/llvm/lib/CodeGen/TargetOptionsImpl.cpp @@ -28,20 +28,6 @@ const Function &F = MF.getFunction(); - // TODO: Remove support for old `fp elim` function attributes after fully - // migrate to use "frame-pointer" - if (!F.hasFnAttribute("frame-pointer")) { - // Check to see if we should eliminate all frame pointers. - if (F.getFnAttribute("no-frame-pointer-elim").getValueAsString() == "true") - return true; - - // Check to see if we should eliminate non-leaf frame pointers. - if (F.hasFnAttribute("no-frame-pointer-elim-non-leaf")) - return MF.getFrameInfo().hasCalls(); - - return false; - } - StringRef FP = F.getFnAttribute("frame-pointer").getValueAsString(); if (FP == "all") return true;