[llvm] r226369 - [PowerPC] Don't list R11 as a patchpoint scratch register
Hal Finkel
hfinkel at anl.gov
Fri Jan 16 19:57:35 PST 2015
Author: hfinkel
Date: Fri Jan 16 21:57:34 2015
New Revision: 226369
URL: http://llvm.org/viewvc/llvm-project?rev=226369&view=rev
Log:
[PowerPC] Don't list R11 as a patchpoint scratch register
R11's status is the same under both the PPC64 ELF V1 and V2 ABIs: it is
reserved for use as an "environment pointer" for compilation models that
require such a thing. We don't, we also don't need a second scratch register,
and because we support only "local" patchpoint call targets, we might as well
let R11 be used for anyregcc patchpoints.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/trunk/test/CodeGen/PowerPC/ppc64-anyregcc.ll
llvm/trunk/test/CodeGen/PowerPC/ppc64-stackmap.ll
Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=226369&r1=226368&r2=226369&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Fri Jan 16 21:57:34 2015
@@ -9910,16 +9910,8 @@ PPCTargetLowering::getScratchRegisters(C
// site. Hence we include LR in the scratch registers, which are in turn added
// as implicit-defs for stackmaps and patchpoints. The same reasoning applies
// to CTR, which is used by any indirect call.
- if (Subtarget.isELFv2ABI()) {
- static const MCPhysReg ScratchRegs[] = {
- PPC::X12, PPC::LR8, PPC::CTR8, 0
- };
-
- return ScratchRegs;
- }
-
static const MCPhysReg ScratchRegs[] = {
- PPC::X12, PPC::X11, PPC::LR8, PPC::CTR8, 0
+ PPC::X12, PPC::LR8, PPC::CTR8, 0
};
return ScratchRegs;
Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-anyregcc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-anyregcc.ll?rev=226369&r1=226368&r2=226369&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-anyregcc.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-anyregcc.ll Fri Jan 16 21:57:34 2015
@@ -26,9 +26,9 @@ target triple = "powerpc64-unknown-linux
; CHECK-NEXT: .quad property_access3
; CHECK-NEXT: .quad 128
; CHECK-NEXT: .quad anyreg_test1
-; CHECK-NEXT: .quad 160
+; CHECK-NEXT: .quad 144
; CHECK-NEXT: .quad anyreg_test2
-; CHECK-NEXT: .quad 160
+; CHECK-NEXT: .quad 144
; CHECK-NEXT: .quad patchpoint_spilldef
; CHECK-NEXT: .quad 256
; CHECK-NEXT: .quad patchpoint_spillargs
Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-stackmap.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-stackmap.ll?rev=226369&r1=226368&r2=226369&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-stackmap.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-stackmap.ll Fri Jan 16 21:57:34 2015
@@ -36,7 +36,7 @@ target triple = "powerpc64-unknown-linux
; CHECK-NEXT: .quad jsIntCall
; CHECK-NEXT: .quad 128
; CHECK-NEXT: .quad spilledValue
-; CHECK-NEXT: .quad 320
+; CHECK-NEXT: .quad 304
; CHECK-NEXT: .quad spilledStackMapValue
; CHECK-NEXT: .quad 224
; CHECK-NEXT: .quad liveConstant
More information about the llvm-commits
mailing list