[PATCH] D21325: [X86] Fix tailcall return address clobber bug

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 15:53:17 PDT 2016


qcolombet added inline comments.

================
Comment at: lib/Target/X86/X86ExpandPseudo.cpp:257
@@ -246,2 +256,3 @@
 bool X86ExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
+  X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
   STI = &static_cast<const X86Subtarget &>(MF.getSubtarget());
----------------
I’d add X86FI as a member so that we do not have to pass it around.

================
Comment at: lib/Target/X86/X86FrameLowering.cpp:1628
@@ +1627,3 @@
+      RetOpcode != X86::TCRETURNri64 && RetOpcode != X86::TCRETURNdi64 &&
+      RetOpcode != X86::TCRETURNmi64) {
+    // Add the return addr area delta back since we are not tail calling.
----------------
add a helper function isTailCallOpcode or something.


http://reviews.llvm.org/D21325





More information about the llvm-commits mailing list