[PATCH] D12681: Calling conventions for HHVM
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 17:08:44 PDT 2015
maksfb updated this revision to Diff 34172.
maksfb added a comment.
Suggested changes by Sanjoy Das..
http://reviews.llvm.org/D12681
Files:
lib/CodeGen/PrologEpilogInserter.cpp
unittests/Support/MathExtrasTest.cpp
Index: unittests/Support/MathExtrasTest.cpp
===================================================================
--- unittests/Support/MathExtrasTest.cpp
+++ unittests/Support/MathExtrasTest.cpp
@@ -183,6 +183,11 @@
EXPECT_EQ(8u, RoundUpToAlignment(5, 8));
EXPECT_EQ(24u, RoundUpToAlignment(17, 8));
EXPECT_EQ(0u, RoundUpToAlignment(~0LL, 8));
+
+ EXPECT_EQ(7u, RoundUpToAlignment(5, 8, 7));
+ EXPECT_EQ(17u, RoundUpToAlignment(17, 8, 1));
+ EXPECT_EQ(3u, RoundUpToAlignment(~0LL, 8, 3));
+ EXPECT_EQ(552u, RoundUpToAlignment(321, 255, 42));
}
}
Index: lib/CodeGen/PrologEpilogInserter.cpp
===================================================================
--- lib/CodeGen/PrologEpilogInserter.cpp
+++ lib/CodeGen/PrologEpilogInserter.cpp
@@ -567,9 +567,8 @@
// objects on the stack because enter the translation cache at a different
// alignment than most functions.
unsigned Skew = 0;
- if (LLVM_UNLIKELY(Fn.getFunction()->getCallingConv() == CallingConv::HHVM)) {
+ if (LLVM_UNLIKELY(Fn.getFunction()->getCallingConv() == CallingConv::HHVM))
Skew = 8;
- }
// If there are fixed sized objects that are preallocated in the local area,
// non-fixed objects can't be allocated right at the start of local area.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12681.34172.patch
Type: text/x-patch
Size: 1252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150908/625b1b35/attachment.bin>
More information about the llvm-commits
mailing list