[PATCH] D13999: X86ISelLowering: Support tail calls to/from thiscall functions
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 18:45:39 PDT 2015
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:3741
@@ -3743,2 +3740,3 @@
+
// Allocate shadow area for Win64
----------------
This doesn't need an extra blank line
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:3806-3808
@@ +3805,5 @@
+ MF.getInfo<X86MachineFunctionInfo>()->getBytesToPopOnReturn()) {
+ // If we have bytes to pop, the callee must pop them.
+ if (!CalleeWillPop || BytesToPop != StackArgsSize)
+ return false;
+ } else if (CalleeWillPop && StackArgsSize > 0) {
----------------
I think factoring out the negation will make this more readable:
bool CalleePopMatches = CalleeWillPop && BytesToPop == StackArgSize;
if (!CalleePopMatches)
return false;
================
Comment at: test/CodeGen/X86/tailcall-msvc-conventions.ll:146
@@ +145,3 @@
+}
+; stdcall to cdecl works if no aruments need popping.
+; CHECK-LABEL: stdcall_cdecl_tail
----------------
s/aruments/arguments/
http://reviews.llvm.org/D13999
More information about the llvm-commits
mailing list