[PATCH] D12681: Calling conventions for HHVM
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 17:02:43 PDT 2015
maksfb added a comment.
Thanks for the review, Quentin!
================
Comment at: include/llvm/Support/MathExtras.h:621
@@ +620,3 @@
+ uint64_t Skew = 0) {
+ Skew %= Align;
+ return (Value + Align - 1 - Skew) / Align * Align + Skew;
----------------
qcolombet wrote:
> In the comment you said that Skew must be less than Align.
> So, this line of code seems useless.
> Either keep that line and change the comment to actually reflect what is happening or change that into an assert Skew < Align.
Good point. I'll change the comment.
================
Comment at: lib/CodeGen/PrologEpilogInserter.cpp:574
@@ +573,3 @@
+ unsigned Skew = 0;
+ if (LLVM_UNLIKELY(Fn.getFunction()->getCallingConv() == CallingConv::HHVM))
+ Skew = 8;
----------------
qcolombet wrote:
> I would rather have a target hook for that: getSkew, so that we do not expose (more) target code in the generic part.
Makes sense. Will move the logic to `TargetFrameLowering`.
http://reviews.llvm.org/D12681
More information about the llvm-commits
mailing list