summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/remove-redundant-toc-saves.ll
Commit message (Collapse)AuthorAgeFilesLines
* [PowerPC] Move TOC save to prologue when profitableNemanja Ivanovic2019-07-051-2/+0
| | | | | | | | | | | | | | | | | | | | | The indirect call sequence on PPC requires that the TOC base register be saved prior to the indirect call and restored after the call since the indirect call may branch to a global entry point in another DSO which will update the TOC base. Over the last couple of years, we have improved this to: - be able to hoist TOC saves from loops (with changes to MachineLICM) - avoid multiple saves when one dominates the other[s] However, it is still possible to have multiple TOC saves dynamically in the execution path if there is no dominance relationship between them. This patch moves the TOC save to the prologue when one of the TOC saves is in a block that post-dominates entry (i.e. it cannot be avoided) or if it is in a block that is hotter than entry. Differential revision: https://reviews.llvm.org/D63803 llvm-svn: 365232
* [PowerPC] Remove redundant TOC savesZaara Syeda2017-11-271-0/+123
This patch adds a peep hole optimization to remove any redundant toc save instructions added as part of the call sequence for indirect calls. It removes any toc saves within a function that are dominated by another toc save. Differential Revision: https://reviews.llvm.org/D39736 llvm-svn: 319087
OpenPOWER on IntegriCloud