diff options
| author | Reed Kotler <rkotler@mips.com> | 2013-05-03 23:17:24 +0000 |
|---|---|---|
| committer | Reed Kotler <rkotler@mips.com> | 2013-05-03 23:17:24 +0000 |
| commit | 2bb955a6931580c9bb0472aa29b3fbbabe263295 (patch) | |
| tree | 894e8f0b2a84a0b073152b4d8525497546005539 /lib/Target/Mips | |
| parent | 3170ad7dd47e2584c44aad7455b161a92058f84a (diff) | |
| download | external_llvm-2bb955a6931580c9bb0472aa29b3fbbabe263295.zip external_llvm-2bb955a6931580c9bb0472aa29b3fbbabe263295.tar.gz external_llvm-2bb955a6931580c9bb0472aa29b3fbbabe263295.tar.bz2 | |
Remove some uneeded pseudos in the presence of the naked function attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
| -rw-r--r-- | lib/Target/Mips/MipsAsmPrinter.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp index f4f71cb..6e4feda 100644 --- a/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/MipsAsmPrinter.cpp @@ -249,12 +249,18 @@ void MipsAsmPrinter::EmitFunctionEntryLabel() { void MipsAsmPrinter::EmitFunctionBodyStart() { MCInstLowering.Initialize(Mang, &MF->getContext()); - emitFrameDirective(); + bool IsNakedFunction = + MF->getFunction()-> + getAttributes().hasAttribute(AttributeSet::FunctionIndex, + Attribute::Naked); + if (!IsNakedFunction) + emitFrameDirective(); if (OutStreamer.hasRawTextSupport()) { SmallString<128> Str; raw_svector_ostream OS(Str); - printSavedRegsBitmask(OS); + if (!IsNakedFunction) + printSavedRegsBitmask(OS); OutStreamer.EmitRawText(OS.str()); if (!Subtarget->inMips16Mode()) { OutStreamer.EmitRawText(StringRef("\t.set\tnoreorder")); |
