Skip to content

Commit 0e49c74

Browse files
committed
PeepholeOpt: Make copy ID methods static
1 parent 557c8bf commit 0e49c74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/PeepholeOptimizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ class PeepholeOptimizer : private MachineFunction::Delegate {
504504

505505
/// Check whether \p MI is understood by the register coalescer
506506
/// but may require some rewriting.
507-
bool isCoalescableCopy(const MachineInstr &MI) {
507+
static bool isCoalescableCopy(const MachineInstr &MI) {
508508
// SubregToRegs are not interesting, because they are already register
509509
// coalescer friendly.
510510
return MI.isCopy() ||
@@ -514,7 +514,7 @@ class PeepholeOptimizer : private MachineFunction::Delegate {
514514

515515
/// Check whether \p MI is a copy like instruction that is
516516
/// not recognized by the register coalescer.
517-
bool isUncoalescableCopy(const MachineInstr &MI) {
517+
static bool isUncoalescableCopy(const MachineInstr &MI) {
518518
return MI.isBitcast() || (!DisableAdvCopyOpt && (MI.isRegSequenceLike() ||
519519
MI.isInsertSubregLike() ||
520520
MI.isExtractSubregLike()));

0 commit comments

Comments
 (0)