[PATCH] D24423: X86: Fold tail calls into conditional branches also for 64-bit (PR26302)

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 13:34:09 PDT 2016


mkuper accepted this revision.
mkuper added a comment.
This revision is now accepted and ready to land.

LGTM, with a couple of nits - feel free to ignore them, except for the typo fix.


================
Comment at: lib/Target/X86/X86ExpandPseudo.cpp:125
@@ +124,3 @@
+      case X86::TCRETURNdicc64:
+        assert(!IsWin64 && "Conditional tail calls confuse the Win64 unfinder.");
+        // TODO: We could do it for Win64 "leaf" functions though; PR30337.
----------------
unfinder -> unwinder.

================
Comment at: lib/Target/X86/X86InstrControl.td:266
@@ -265,3 +265,3 @@
                            (ins i32imm_pcrel:$dst, i32imm:$cond),
-                           "",
+                           "tailjmpd_cc",
                            [], IIC_JMP_REL>;
----------------
Do we ever expect to print this? Is this just for debugging?
(Will this cause us to end up allowing this in the asm reader?)

================
Comment at: lib/Target/X86/X86InstrControl.td:311
@@ +310,3 @@
+                        []>;
+  def TCRETURNdicc64 : PseudoI<(outs),
+                        (ins i64i32imm_pcrel:$dst, i32imm:$offset,
----------------
Totally nitpicking, but maybe di64cc (which will also better match d64_CC below)?

================
Comment at: lib/Target/X86/X86InstrControl.td:326
@@ +325,3 @@
+                           (ins i64i32imm_pcrel:$dst, i32imm:$cond),
+                           "tailjmpd64_cc",
+                           [], IIC_JMP_REL>;
----------------
Same as above.


https://reviews.llvm.org/D24423





More information about the llvm-commits mailing list