1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Make some methods const.

llvm-svn: 59540
This commit is contained in:
Dan Gohman 2008-11-18 19:04:29 +00:00
parent d8981479c2
commit 5926405b4a
2 changed files with 6 additions and 4 deletions

View File

@ -248,11 +248,11 @@ public:
/// 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 isSafeToMove(const TargetInstrInfo *TII, bool &SawStore);
bool isSafeToMove(const TargetInstrInfo *TII, bool &SawStore) const;
/// isSafeToReMat - Return true if it's safe to rematerialize the specified
/// instruction which defined the specified register instead of copying it.
bool isSafeToReMat(const TargetInstrInfo *TII, unsigned DstReg);
bool isSafeToReMat(const TargetInstrInfo *TII, unsigned DstReg) const;
/// hasVolatileMemoryRef - Return true if this instruction may have a
/// volatile memory reference, or if the information describing the

View File

@ -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) ||