diff options
author | Lei Huang <lei@ca.ibm.com> | 2017-06-15 18:29:59 +0000 |
---|---|---|
committer | Lei Huang <lei@ca.ibm.com> | 2017-06-15 18:29:59 +0000 |
commit | b4733ca8c5e5dedfaa1ed60163a05a13c05440b5 (patch) | |
tree | e381be03e92df310a3839e4677e06ebdb3bfd79e /clang/unittests/Basic/VirtualFileSystemTest.cpp | |
parent | f7e804157ee3b91f020bd5b3abc941e45a698d34 (diff) | |
download | llvm-b4733ca8c5e5dedfaa1ed60163a05a13c05440b5.zip llvm-b4733ca8c5e5dedfaa1ed60163a05a13c05440b5.tar.gz llvm-b4733ca8c5e5dedfaa1ed60163a05a13c05440b5.tar.bz2 |
[MachineLICM] Hoist TOC-based address instructions
Add condition for MachineLICM to safely hoist instructions that utilize
non constant registers that are reserved.
On PPC, global variable access is done through the table of contents (TOC)
which is always in register X2. The ABI reserves this register in any
functions that have calls or access global variables.
A call through a function pointer involves saving, changing and restoring
this register around the call and thus MachineLICM does not consider it to
be invariant. We can however guarantee the register is preserved across the
call and thus is invariant.
Differential Revision: https://reviews.llvm.org/D33562
llvm-svn: 305490
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions