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/Target/X86/X86SpeculativeLoadHardening.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/Target/X86/X86SpeculativeLoadHardening.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/Target/X86/X86SpeculativeLoadHardening.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libs/llvm12/lib/Target/X86/X86SpeculativeLoadHardening.cpp b/contrib/libs/llvm12/lib/Target/X86/X86SpeculativeLoadHardening.cpp index aa73d4bce6..0edb63589a 100644 --- a/contrib/libs/llvm12/lib/Target/X86/X86SpeculativeLoadHardening.cpp +++ b/contrib/libs/llvm12/lib/Target/X86/X86SpeculativeLoadHardening.cpp @@ -184,7 +184,7 @@ private: MachineBasicBlock::iterator InsertPt, DebugLoc Loc); void restoreEFLAGS(MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, DebugLoc Loc, - Register Reg); + Register Reg); void mergePredStateIntoSP(MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, DebugLoc Loc, @@ -200,8 +200,8 @@ private: MachineInstr * sinkPostLoadHardenedInst(MachineInstr &MI, SmallPtrSetImpl<MachineInstr *> &HardenedInstrs); - bool canHardenRegister(Register Reg); - unsigned hardenValueInRegister(Register Reg, MachineBasicBlock &MBB, + bool canHardenRegister(Register Reg); + unsigned hardenValueInRegister(Register Reg, MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, DebugLoc Loc); unsigned hardenPostLoad(MachineInstr &MI); @@ -1520,7 +1520,7 @@ unsigned X86SpeculativeLoadHardeningPass::saveEFLAGS( /// reliably lower. void X86SpeculativeLoadHardeningPass::restoreEFLAGS( MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, DebugLoc Loc, - Register Reg) { + Register Reg) { BuildMI(MBB, InsertPt, Loc, TII->get(X86::COPY), X86::EFLAGS).addReg(Reg); ++NumInstsInserted; } @@ -1842,7 +1842,7 @@ MachineInstr *X86SpeculativeLoadHardeningPass::sinkPostLoadHardenedInst( // just bail. Also check that its register class is one of the ones we // can harden. Register UseDefReg = UseMI.getOperand(0).getReg(); - if (!UseDefReg.isVirtual() || !canHardenRegister(UseDefReg)) + if (!UseDefReg.isVirtual() || !canHardenRegister(UseDefReg)) return {}; SingleUseMI = &UseMI; @@ -1864,7 +1864,7 @@ MachineInstr *X86SpeculativeLoadHardeningPass::sinkPostLoadHardenedInst( return MI; } -bool X86SpeculativeLoadHardeningPass::canHardenRegister(Register Reg) { +bool X86SpeculativeLoadHardeningPass::canHardenRegister(Register Reg) { auto *RC = MRI->getRegClass(Reg); int RegBytes = TRI->getRegSizeInBits(*RC) / 8; if (RegBytes > 8) @@ -1908,10 +1908,10 @@ bool X86SpeculativeLoadHardeningPass::canHardenRegister(Register Reg) { /// The new, hardened virtual register is returned. It will have the same /// register class as `Reg`. unsigned X86SpeculativeLoadHardeningPass::hardenValueInRegister( - Register Reg, MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, + Register Reg, MachineBasicBlock &MBB, MachineBasicBlock::iterator InsertPt, DebugLoc Loc) { assert(canHardenRegister(Reg) && "Cannot harden this register!"); - assert(Reg.isVirtual() && "Cannot harden a physical register!"); + assert(Reg.isVirtual() && "Cannot harden a physical register!"); auto *RC = MRI->getRegClass(Reg); int Bytes = TRI->getRegSizeInBits(*RC) / 8; |