[llvm-commits] [PATCH, Hexagon]: Remove unnecessary saves and restores to and from the stack in leaf functions.

Pranav Bhandarkar pranavb at codeaurora.org
Fri Aug 10 15:34:22 PDT 2012


Hi,

This is a fix for PR-13572 (http://llvm.org/bugs/show_bug.cgi?id=13572).

HexagonInstrInfo.td wrongly encoded that register pairs D0 through D10, R22,
R23, R28, R31 and the predicate registers were clobbered
by a tail call  instruction. So if a function turned into a leaf function on
account of a call being converted into a tail call (jump), the caller-save
registers would still get saved on the stack and restored from it, quite
unnecessarily.

The attached patch fixes this problem. I have tested that it builds and
installs and have also run make check without any regressions with this
patch.

Pranav

Qualcomm Innovation Center (QuIC) is a member of the Code Aurora Forum.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-LLVM-Bug-Fix-13572-No-need-to-save-and-restore-calle.patch
Type: application/octet-stream
Size: 2690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120810/9e4b570b/attachment.obj>


More information about the llvm-commits mailing list