diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index 365a84ab524..16bf6ea765f 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -197,6 +197,10 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) {    if (CSRegs == 0 || CSRegs[0] == 0)      return; +  // In Naked functions we aren't going to save any registers. +  if (Fn.getFunction()->hasFnAttr(Attribute::Naked)) +    return; +    // Figure out which *callee saved* registers are modified by the current    // function, thus needing to be saved and restored in the prolog/epilog.    const TargetRegisterClass * const *CSRegClasses = | 

