Add a new differingRegisterClasses method
authorChris Lattner <sabre@nondot.org>
Sat, 24 Jul 2004 02:53:43 +0000 (02:53 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 24 Jul 2004 02:53:43 +0000 (02:53 +0000)
make overlapsAliases take pointers instead of references
fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15153 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/LiveIntervalAnalysis.h

index b4228ce9b6c8cb45301138bf61548dbddef7b305..c9db013d97642b6f0431593fb1d0f29fe4873786 100644 (file)
@@ -96,8 +96,8 @@ namespace llvm {
 
         LiveInterval& getInterval(unsigned reg) {
           Reg2IntervalMap::iterator I = r2iMap_.find(reg);
-            assert(I != r2iMap_.end()&& "Interval does not exist for register");
-            return *I->second;
+          assert(I != r2iMap_.end()&& "Interval does not exist for register");
+          return *I->second;
         }
 
         /// getInstructionIndex - returns the base index of instr
@@ -152,8 +152,12 @@ namespace llvm {
                                        MachineBasicBlock::iterator mi,
                                        LiveInterval& interval);
 
-        bool overlapsAliases(const LiveInterval& lhs, 
-                             const LiveInterval& rhs) const;
+        /// Return true if the two specified registers belong to different
+        /// register classes.  The registers may be either phys or virt regs.
+        bool differingRegisterClasses(unsigned RegA, unsigned RegB) const;
+
+        bool overlapsAliases(const LiveInterval *lhs, 
+                             const LiveInterval *rhs) const;
 
 
         LiveInterval& getOrCreateInterval(unsigned reg);
index b4228ce9b6c8cb45301138bf61548dbddef7b305..c9db013d97642b6f0431593fb1d0f29fe4873786 100644 (file)
@@ -96,8 +96,8 @@ namespace llvm {
 
         LiveInterval& getInterval(unsigned reg) {
           Reg2IntervalMap::iterator I = r2iMap_.find(reg);
-            assert(I != r2iMap_.end()&& "Interval does not exist for register");
-            return *I->second;
+          assert(I != r2iMap_.end()&& "Interval does not exist for register");
+          return *I->second;
         }
 
         /// getInstructionIndex - returns the base index of instr
@@ -152,8 +152,12 @@ namespace llvm {
                                        MachineBasicBlock::iterator mi,
                                        LiveInterval& interval);
 
-        bool overlapsAliases(const LiveInterval& lhs, 
-                             const LiveInterval& rhs) const;
+        /// Return true if the two specified registers belong to different
+        /// register classes.  The registers may be either phys or virt regs.
+        bool differingRegisterClasses(unsigned RegA, unsigned RegB) const;
+
+        bool overlapsAliases(const LiveInterval *lhs, 
+                             const LiveInterval *rhs) const;
 
 
         LiveInterval& getOrCreateInterval(unsigned reg);