aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-18 19:04:29 +0000
committerDan Gohman <gohman@apple.com>2008-11-18 19:04:29 +0000
commit9ca19a388bc5dc39525daa039cb314642c005698 (patch)
tree6e024dc121efa7c14f75ebafd838c3bd3b120c90 /lib/CodeGen/MachineInstr.cpp
parent35d69b05b3f8584b8646e7e77faec9a8c0ebf9c2 (diff)
downloadexternal_llvm-9ca19a388bc5dc39525daa039cb314642c005698.zip
external_llvm-9ca19a388bc5dc39525daa039cb314642c005698.tar.gz
external_llvm-9ca19a388bc5dc39525daa039cb314642c005698.tar.bz2
Make some methods const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 81fe48e..dfa4629 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -695,7 +695,8 @@ void MachineInstr::copyPredicates(const MachineInstr *MI) {
/// isSafeToMove - Return true if it is safe to move this instruction. If
/// SawStore is set to true, it means that there is a store (or call) between
/// the instruction's location and its intended destination.
-bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII, bool &SawStore) {
+bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII,
+ bool &SawStore) const {
// Ignore stuff that we obviously can't move.
if (TID->mayStore() || TID->isCall()) {
SawStore = true;
@@ -719,7 +720,8 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII, bool &SawStore) {
/// isSafeToReMat - Return true if it's safe to rematerialize the specified
/// instruction which defined the specified register instead of copying it.
-bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII, unsigned DstReg) {
+bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII,
+ unsigned DstReg) const {
bool SawStore = false;
if (!getDesc().isRematerializable() ||
!TII->isTriviallyReMaterializable(this) ||