summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-04-29 20:57:16 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-04-29 20:57:16 +0000
commit1971dc700798da0bc7e200c4c943c8f9282c47a7 (patch)
tree4bb9de5217a009f6de4c87cfa86c8e87b08236c9 /llvm/lib/CodeGen/MachineInstr.cpp
parente55f8660bedc26c74f88d1b55bdb35a92f466a82 (diff)
downloadbcm5719-llvm-1971dc700798da0bc7e200c4c943c8f9282c47a7.tar.gz
bcm5719-llvm-1971dc700798da0bc7e200c4c943c8f9282c47a7.zip
MachineInstr::isRegTiedTo{Use,Def}Operand can safely be made const.
llvm-svn: 70408
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 4e5229fad0e..9cfff82233d 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -709,7 +709,8 @@ int MachineInstr::findFirstPredOperandIdx() const {
/// check if the register def is tied to a source operand, due to either
/// two-address elimination or inline assembly constraints. Returns the
/// first tied use operand index by reference is UseOpIdx is not null.
-bool MachineInstr::isRegTiedToUseOperand(unsigned DefOpIdx, unsigned *UseOpIdx){
+bool MachineInstr::
+isRegTiedToUseOperand(unsigned DefOpIdx, unsigned *UseOpIdx) const {
if (getOpcode() == TargetInstrInfo::INLINEASM) {
assert(DefOpIdx >= 2);
const MachineOperand &MO = getOperand(DefOpIdx);
@@ -759,7 +760,8 @@ bool MachineInstr::isRegTiedToUseOperand(unsigned DefOpIdx, unsigned *UseOpIdx){
/// isRegTiedToDefOperand - Return true if the operand of the specified index
/// is a register use and it is tied to an def operand. It also returns the def
/// operand index by reference.
-bool MachineInstr::isRegTiedToDefOperand(unsigned UseOpIdx, unsigned *DefOpIdx){
+bool MachineInstr::
+isRegTiedToDefOperand(unsigned UseOpIdx, unsigned *DefOpIdx) const {
if (getOpcode() == TargetInstrInfo::INLINEASM) {
const MachineOperand &MO = getOperand(UseOpIdx);
if (!MO.isReg() || !MO.isUse() || MO.getReg() == 0)
OpenPOWER on IntegriCloud