PPC: Enable aggressive anti-dependency breaking
authorHal Finkel <hfinkel@anl.gov>
Thu, 12 Sep 2013 05:24:49 +0000 (05:24 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 12 Sep 2013 05:24:49 +0000 (05:24 +0000)
commit411dea0e7206ccc8018261831225d898d069ff1d
tree986de438669a3155018bbb0f19c7339cb43eb956
parent9ec1a55a863f658292b19d7a3c167ba089134dff
PPC: Enable aggressive anti-dependency breaking

Aggressive anti-dependency breaking is enabled by default for all PPC cores.
This provides a general speedup on the P7 and other platforms (among other
factors, the instruction group formation for the non-embedded PPC cores is done
during post-RA scheduling). In order to do this safely, the incompatibility
between uses of the MFOCRF instruction and anti-dependency breaking are
resolved by marking MFOCRF with hasExtraSrcRegAllocReq. As noted in the removed
FIXME, the problem was that MFOCRF's output is sensitive to the identify of the
source register, and always paired with a shift to undo this effect. Because
anti-dependency breaking is unaware of this hidden dependency of the shift
amount on the source register of the MFOCRF instruction, changing that register
must be inhibited.

Two test cases were adjusted: The SjLj test was made more insensitive to
register choices and scheduling; the saveCR test disabled anti-dependency
breaking because part of what it is testing is proper register reuse.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190587 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrInfo.td
lib/Target/PowerPC/PPCSubtarget.cpp
test/CodeGen/PowerPC/2010-02-12-saveCR.ll
test/CodeGen/PowerPC/sjlj.ll