[PowerPC] Fix reverted patch r227976 to avoid register assignment issues
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 10 Feb 2015 19:09:05 +0000 (19:09 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 10 Feb 2015 19:09:05 +0000 (19:09 +0000)
commit49b3971b7059a33d0fe1a1ebfa01df57158066db
treeb12fcf2cd93d4b6519aa0427d607c6c6d561621c
parent3163865f01793ce7652b37ff8294db62aa6c6e42
[PowerPC] Fix reverted patch r227976 to avoid register assignment issues

See full discussion in http://reviews.llvm.org/D7491.

We now hide the add-immediate and call instructions together in a
separate pseudo-op, which is tagged to define GPR3 and clobber the
call-killed registers.  The PPCTLSDynamicCall pass prior to RA now
expands this op into the two separate addi and call ops, with explicit
definitions of GPR3 on both instructions, and explicit clobbers on the
call instruction.  The pass is now marked as requiring and preserving
the LiveIntervals and SlotIndexes analyses, and fixes these up after
the replacement sequences are introduced.

Self-hosting has been verified on LE P8 and BE P7 with various
optimization levels, etc.  It has also been verified with the
--no-tls-optimize flag workaround removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228725 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/Target/PowerPC/CMakeLists.txt
lib/Target/PowerPC/PPC.h
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCFrameLowering.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrInfo.td
lib/Target/PowerPC/PPCMCInstLower.cpp
lib/Target/PowerPC/PPCTLSDynamicCall.cpp [new file with mode: 0644]
lib/Target/PowerPC/PPCTargetMachine.cpp
test/CodeGen/PowerPC/retaddr2.ll
test/CodeGen/PowerPC/tls-cse.ll [new file with mode: 0644]
test/CodeGen/PowerPC/tls-store2.ll