aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-02-18 20:55:12 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-02-18 20:55:12 +0000
commit53bc37ca2a9ce79e03bb72edc4ace81442300f39 (patch)
tree9fee7c08ee74ff8537d28abc845c7229d35cc160 /llvm/lib/CodeGen/PrologEpilogInserter.cpp
parent3489bcc9ababd148d680fbdafb932b3c7710ba6b (diff)
downloadllvm-53bc37ca2a9ce79e03bb72edc4ace81442300f39.zip
llvm-53bc37ca2a9ce79e03bb72edc4ace81442300f39.tar.gz
llvm-53bc37ca2a9ce79e03bb72edc4ace81442300f39.tar.bz2
Support for HiPE-compatible code emission, patch by Yiannis Tsiouris.
llvm-svn: 175457
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 954613d..45e04a9 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -693,6 +693,14 @@ void PEI::insertPrologEpilogCode(MachineFunction &Fn) {
// space in small chunks instead of one large contiguous block.
if (Fn.getTarget().Options.EnableSegmentedStacks)
TFI.adjustForSegmentedStacks(Fn);
+
+ // Emit additional code that is required to explicitly handle the stack in
+ // HiPE native code (if needed) when loaded in the Erlang/OTP runtime. The
+ // approach is rather similar to that of Segmented Stacks, but it uses a
+ // different conditional check and another BIF for allocating more stack
+ // space.
+ if (Fn.getFunction()->getCallingConv() == CallingConv::HiPE)
+ TFI.adjustForHiPEPrologue(Fn);
}
/// replaceFrameIndices - Replace all MO_FrameIndex operands with physical