[llvm-commits] [llvm] r167972 - /llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp

Jakub Staszak kubastaszak at gmail.com
Wed Nov 14 12:31:04 PST 2012


Author: kuba
Date: Wed Nov 14 14:31:04 2012
New Revision: 167972

URL: http://llvm.org/viewvc/llvm-project?rev=167972&view=rev
Log:
canJoinPhys method doesn't modify CoalescerPair. Make it const.

Modified:
    llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp

Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=167972&r1=167971&r2=167972&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Wed Nov 14 14:31:04 2012
@@ -178,7 +178,7 @@
                                  MachineInstr *CopyMI);
 
     /// canJoinPhys - Return true if a physreg copy should be joined.
-    bool canJoinPhys(CoalescerPair &CP);
+    bool canJoinPhys(const CoalescerPair &CP);
 
     /// updateRegDefsUses - Replace all defs and uses of SrcReg to DstReg and
     /// update the subregister number if it is not zero. If DstReg is a
@@ -928,7 +928,7 @@
 }
 
 /// canJoinPhys - Return true if a copy involving a physreg should be joined.
-bool RegisterCoalescer::canJoinPhys(CoalescerPair &CP) {
+bool RegisterCoalescer::canJoinPhys(const CoalescerPair &CP) {
   /// Always join simple intervals that are defined by a single copy from a
   /// reserved register. This doesn't increase register pressure, so it is
   /// always beneficial.





More information about the llvm-commits mailing list