From 05bd016f73a5e2d9402923a1da73034a7ca53c72 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 28 Jun 2016 12:49:12 +0000 Subject: [PATCH] Convert 2 more uses to shouldAssumeDSOLocal(). NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274009 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCFrameLowering.cpp | 4 +--- lib/Target/PowerPC/PPCTargetMachine.cpp | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Target/PowerPC/PPCFrameLowering.cpp b/lib/Target/PowerPC/PPCFrameLowering.cpp index 4d71d20ac78..3ed89473858 100644 --- a/lib/Target/PowerPC/PPCFrameLowering.cpp +++ b/lib/Target/PowerPC/PPCFrameLowering.cpp @@ -76,9 +76,7 @@ static unsigned computeBasePointerSaveOffset(const PPCSubtarget &STI) { // SVR4 ABI: First slot in the general register save area. return STI.isPPC64() ? -16U - : (STI.getTargetMachine().getRelocationModel() == Reloc::PIC_) - ? -12U - : -8U; + : STI.getTargetMachine().isPositionIndependent() ? -12U : -8U; } PPCFrameLowering::PPCFrameLowering(const PPCSubtarget &STI) diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 34c9259243d..a4ff86cb1e2 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -402,7 +402,9 @@ void PPCPassConfig::addPreRegAlloc() { insertPass(VSXFMAMutateEarly ? &RegisterCoalescerID : &MachineSchedulerID, &PPCVSXFMAMutateID); } - if (getPPCTargetMachine().getRelocationModel() == Reloc::PIC_) { + + // FIXME: We probably don't need to run these for -fPIE. + if (getPPCTargetMachine().isPositionIndependent()) { // FIXME: LiveVariables should not be necessary here! // PPCTLSDYnamicCallPass uses LiveIntervals which previously dependet on // LiveVariables. This (unnecessary) dependency has been removed now,