summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-05-03 23:17:24 +0000
committerReed Kotler <rkotler@mips.com>2013-05-03 23:17:24 +0000
commit0f2b10eb0d59c1b02aa63602756abb74f25877ae (patch)
tree47cd74a53f3f2c7b3cb23e5d3040bf92df53cff2 /llvm/lib
parent5b637078e1ab1946ef771210c97ca4b4bfacc4f5 (diff)
downloadbcm5719-llvm-0f2b10eb0d59c1b02aa63602756abb74f25877ae.tar.gz
bcm5719-llvm-0f2b10eb0d59c1b02aa63602756abb74f25877ae.zip
Remove some uneeded pseudos in the presence of the naked function attribute.
llvm-svn: 181072
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Mips/MipsAsmPrinter.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index f4f71cbccb2..6e4feda4f53 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/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"));
OpenPOWER on IntegriCloud