summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-20 18:08:06 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-20 18:08:06 +0000
commit7b79b9862c9e6fc31ec072acb09171fd6ec7b0e0 (patch)
tree9339eaeac97e371b23610c234eaaa9fe0ff16e9a /lib/CodeGen/RegAllocFast.cpp
parentffc7d3b0adeae2303e70f234ba033d76a78108bb (diff)
downloadllvm-7b79b9862c9e6fc31ec072acb09171fd6ec7b0e0.tar.gz
llvm-7b79b9862c9e6fc31ec072acb09171fd6ec7b0e0.tar.bz2
llvm-7b79b9862c9e6fc31ec072acb09171fd6ec7b0e0.tar.xz
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
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r--lib/CodeGen/RegAllocFast.cpp6
1 files changed, 2 insertions, 4 deletions
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));
}
}