[PATCH] D128421: [PowerPC] PPCTLSDynamicCall does not preserve LiveIntervals
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 03:33:18 PDT 2022
foad created this revision.
Herald added subscribers: shchenz, kbarton, hiraditya, nemanjai.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
According to D127731 <https://reviews.llvm.org/D127731>, PPCTLSDynamicCall does not preserve
LiveIntervals, so stop claiming that it does and remove the code
that tried to repair them. NFCI.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128421
Files:
llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
Index: llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
+++ llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
@@ -43,7 +43,6 @@
}
const PPCInstrInfo *TII;
- LiveIntervals *LIS;
protected:
bool processBlock(MachineBasicBlock &MBB) {
@@ -83,11 +82,8 @@
Register InReg = PPC::NoRegister;
Register GPR3 = Is64Bit ? PPC::X3 : PPC::R3;
Register GPR4 = Is64Bit ? PPC::X4 : PPC::R4;
- SmallVector<Register, 3> OrigRegs = {OutReg, GPR3};
- if (!IsPCREL) {
+ if (!IsPCREL)
InReg = MI.getOperand(1).getReg();
- OrigRegs.push_back(InReg);
- }
DebugLoc DL = MI.getDebugLoc();
unsigned Opc1, Opc2;
@@ -139,11 +135,6 @@
BuildMI(MBB, I, DL, TII->get(PPC::ADJCALLSTACKDOWN)).addImm(0)
.addImm(0);
- // The ADDItls* instruction is the first instruction in the
- // repair range.
- MachineBasicBlock::iterator First = I;
- --First;
-
if (IsAIX) {
// The variable offset and region handle are copied in r4 and r3. The
// copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX.
@@ -177,16 +168,10 @@
BuildMI(MBB, I, DL, TII->get(TargetOpcode::COPY), OutReg)
.addReg(GPR3);
- // The COPY is the last instruction in the repair range.
- MachineBasicBlock::iterator Last = I;
- --Last;
-
// Move past the original instruction and remove it.
++I;
MI.removeFromParent();
- // Repair the live intervals.
- LIS->repairIntervalsInRange(&MBB, First, Last, OrigRegs);
Changed = true;
}
@@ -204,7 +189,6 @@
bool runOnMachineFunction(MachineFunction &MF) override {
TII = MF.getSubtarget<PPCSubtarget>().getInstrInfo();
- LIS = &getAnalysis<LiveIntervals>();
bool Changed = false;
@@ -217,7 +201,6 @@
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<LiveIntervals>();
- AU.addPreserved<LiveIntervals>();
AU.addRequired<SlotIndexes>();
AU.addPreserved<SlotIndexes>();
MachineFunctionPass::getAnalysisUsage(AU);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128421.439315.patch
Type: text/x-patch
Size: 2338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220623/33be5fc6/attachment.bin>
More information about the llvm-commits
mailing list