diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/lib/CodeGen/MachineTraceMetrics.cpp | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/CodeGen/MachineTraceMetrics.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/CodeGen/MachineTraceMetrics.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/contrib/libs/llvm12/lib/CodeGen/MachineTraceMetrics.cpp b/contrib/libs/llvm12/lib/CodeGen/MachineTraceMetrics.cpp index 8df23b781f..34cfa4c2f1 100644 --- a/contrib/libs/llvm12/lib/CodeGen/MachineTraceMetrics.cpp +++ b/contrib/libs/llvm12/lib/CodeGen/MachineTraceMetrics.cpp @@ -701,15 +701,15 @@ static void updatePhysDepsDownwards(const MachineInstr *UseMI, SmallVectorImpl<DataDep> &Deps, SparseSet<LiveRegUnit> &RegUnits, const TargetRegisterInfo *TRI) { - SmallVector<MCRegister, 8> Kills; + SmallVector<MCRegister, 8> Kills; SmallVector<unsigned, 8> LiveDefOps; for (MachineInstr::const_mop_iterator MI = UseMI->operands_begin(), ME = UseMI->operands_end(); MI != ME; ++MI) { const MachineOperand &MO = *MI; - if (!MO.isReg() || !MO.getReg().isPhysical()) + if (!MO.isReg() || !MO.getReg().isPhysical()) continue; - MCRegister Reg = MO.getReg().asMCReg(); + MCRegister Reg = MO.getReg().asMCReg(); // Track live defs and kills for updating RegUnits. if (MO.isDef()) { if (MO.isDead()) @@ -732,14 +732,14 @@ static void updatePhysDepsDownwards(const MachineInstr *UseMI, // Update RegUnits to reflect live registers after UseMI. // First kills. - for (MCRegister Kill : Kills) + for (MCRegister Kill : Kills) for (MCRegUnitIterator Units(Kill, TRI); Units.isValid(); ++Units) RegUnits.erase(*Units); // Second, live defs. for (unsigned DefOp : LiveDefOps) { - for (MCRegUnitIterator Units(UseMI->getOperand(DefOp).getReg().asMCReg(), - TRI); + for (MCRegUnitIterator Units(UseMI->getOperand(DefOp).getReg().asMCReg(), + TRI); Units.isValid(); ++Units) { LiveRegUnit &LRU = RegUnits[*Units]; LRU.MI = UseMI; @@ -765,7 +765,7 @@ computeCrossBlockCriticalPath(const TraceBlockInfo &TBI) { assert(TBI.HasValidInstrHeights && "Missing height info"); unsigned MaxLen = 0; for (const LiveInReg &LIR : TBI.LiveIns) { - if (!LIR.Reg.isVirtual()) + if (!LIR.Reg.isVirtual()) continue; const MachineInstr *DefMI = MTM.MRI->getVRegDef(LIR.Reg); // Ignore dependencies outside the current trace. @@ -911,8 +911,8 @@ static unsigned updatePhysDepsUpwards(const MachineInstr &MI, unsigned Height, continue; // This is a def of Reg. Remove corresponding entries from RegUnits, and // update MI Height to consider the physreg dependencies. - for (MCRegUnitIterator Units(Reg.asMCReg(), TRI); Units.isValid(); - ++Units) { + for (MCRegUnitIterator Units(Reg.asMCReg(), TRI); Units.isValid(); + ++Units) { SparseSet<LiveRegUnit>::iterator I = RegUnits.find(*Units); if (I == RegUnits.end()) continue; @@ -930,15 +930,15 @@ static unsigned updatePhysDepsUpwards(const MachineInstr &MI, unsigned Height, } // Now we know the height of MI. Update any regunits read. - for (size_t I = 0, E = ReadOps.size(); I != E; ++I) { - MCRegister Reg = MI.getOperand(ReadOps[I]).getReg().asMCReg(); + for (size_t I = 0, E = ReadOps.size(); I != E; ++I) { + MCRegister Reg = MI.getOperand(ReadOps[I]).getReg().asMCReg(); for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units) { LiveRegUnit &LRU = RegUnits[*Units]; // Set the height to the highest reader of the unit. if (LRU.Cycle <= Height && LRU.MI != &MI) { LRU.Cycle = Height; LRU.MI = &MI; - LRU.Op = ReadOps[I]; + LRU.Op = ReadOps[I]; } } } @@ -979,7 +979,7 @@ void MachineTraceMetrics::Ensemble:: addLiveIns(const MachineInstr *DefMI, unsigned DefOp, ArrayRef<const MachineBasicBlock*> Trace) { assert(!Trace.empty() && "Trace should contain at least one block"); - Register Reg = DefMI->getOperand(DefOp).getReg(); + Register Reg = DefMI->getOperand(DefOp).getReg(); assert(Register::isVirtualRegister(Reg)); const MachineBasicBlock *DefMBB = DefMI->getParent(); @@ -1027,7 +1027,7 @@ computeInstrHeights(const MachineBasicBlock *MBB) { if (MBB) { TraceBlockInfo &TBI = BlockInfo[MBB->getNumber()]; for (LiveInReg &LI : TBI.LiveIns) { - if (LI.Reg.isVirtual()) { + if (LI.Reg.isVirtual()) { // For virtual registers, the def latency is included. unsigned &Height = Heights[MTM.MRI->getVRegDef(LI.Reg)]; if (Height < LI.Height) |