From 7b79b9862c9e6fc31ec072acb09171fd6ec7b0e0 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 20 Dec 2012 18:08:06 +0000 Subject: Use MachineInstrBuilder in a few CodeGen passes. This automatically passes a context pointer to MI->addOperand(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170711 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegAllocFast.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/RegAllocFast.cpp') diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp index 4c629993c7..3082ce16d0 100644 --- a/lib/CodeGen/RegAllocFast.cpp +++ b/lib/CodeGen/RegAllocFast.cpp @@ -822,10 +822,8 @@ void RAFast::addRetOperands(MachineBasicBlock *MBB) { } } if (!Found) - MI->addOperand(MachineOperand::CreateReg(Reg, - false /*IsDef*/, - true /*IsImp*/, - hasDef/*IsKill*/)); + MachineInstrBuilder(*MF, MI) + .addReg(Reg, llvm::RegState::Implicit | getKillRegState(hasDef)); } } -- cgit v1.2.3