diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-18 20:55:12 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-18 20:55:12 +0000 |
commit | 53bc37ca2a9ce79e03bb72edc4ace81442300f39 (patch) | |
tree | 9fee7c08ee74ff8537d28abc845c7229d35cc160 /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 3489bcc9ababd148d680fbdafb932b3c7710ba6b (diff) | |
download | llvm-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.cpp | 8 |
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 |