Merge "[MIPS64] Pass large objects by value for mips64 arch"
am: 6834cd0d47
Change-Id: I3c32aa7e6c1372c3cf23f7ce88c43697bfdac89b
diff --git a/lib/Compiler.cpp b/lib/Compiler.cpp
index 5000fa1..44f23c5 100644
--- a/lib/Compiler.cpp
+++ b/lib/Compiler.cpp
@@ -269,8 +269,9 @@
// These passes have to come after LTO, since we don't want to examine
// functions that are never actually called.
- if (llvm::Triple(getTargetMachine().getTargetTriple()).getArch() == llvm::Triple::x86_64)
- transformPasses.add(createRSX86_64CallConvPass()); // Add pass to correct calling convention for X86-64.
+ if (llvm::Triple(getTargetMachine().getTargetTriple()).getArch() == llvm::Triple::x86_64 ||
+ llvm::Triple(getTargetMachine().getTargetTriple()).getArch() == llvm::Triple::mips64el)
+ transformPasses.add(createRSX86_64CallConvPass()); // Add pass to correct calling convention for X86-64 and mips64.
transformPasses.add(createRSIsThreadablePass()); // Add pass to mark script as threadable.
// RSEmbedInfoPass needs to come after we have scanned for non-threadable