This is an archive of the discontinued LLVM Phabricator instance.

X86: Fold tail calls into conditional branches also for 64-bit (PR26302)
ClosedPublic

Authored by hans on Sep 9 2016, 1:10 PM.

Details

Summary

This extends the optimization in r280832 to also work for 64-bit. The only
quirk is that we can't do this for 64-bit Windows (yet).

Diff Detail

Event Timeline

hans updated this revision to Diff 70891.Sep 9 2016, 1:10 PM
hans retitled this revision from to X86: Fold tail calls into conditional branches also for 64-bit (PR26302).
hans updated this object.
hans added a reviewer: mkuper.
hans added a subscriber: llvm-commits.
mkuper accepted this revision.Sep 9 2016, 1:34 PM
mkuper edited edge metadata.

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

lib/Target/X86/X86ExpandPseudo.cpp
125

unfinder -> unwinder.

lib/Target/X86/X86InstrControl.td
266

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?)

311

Totally nitpicking, but maybe di64cc (which will also better match d64_CC below)?

326

Same as above.

This revision is now accepted and ready to land.Sep 9 2016, 1:34 PM
hans marked 2 inline comments as done.Sep 9 2016, 3:45 PM

Thanks for the review!

lib/Target/X86/X86InstrControl.td
266

For a moment I thought we printed these in debug output somewhere, but now I can't find anywhere that do. I'll just remove it.

311

Sounds good to me.

This revision was automatically updated to reflect the committed changes.