Give simple reg allocator a nice Pass Name
authorChris Lattner <sabre@nondot.org>
Sun, 15 Dec 2002 21:13:12 +0000 (21:13 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Dec 2002 21:13:12 +0000 (21:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5058 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocSimple.cpp

index 17b1044c5ce9efa53db09981099e7854563f0762..73c193ba5b897ba48e6d01ca3517c056b8efa313 100644 (file)
@@ -80,6 +80,10 @@ namespace {
       return runOnMachineFunction(MachineFunction::get(&Fn));
     }
 
+    virtual const char *getPassName() const {
+      return "Simple Register Allocator";
+    }
+
   private:
     /// runOnMachineFunction - Register allocate the whole function
     bool runOnMachineFunction(MachineFunction &Fn);
@@ -328,7 +332,7 @@ void RegAllocSimple::EliminatePHINodes(MachineBasicBlock &MBB) {
           saveVirtRegToStack(opBlock, opI, virtualReg, physReg);
         } else {
           // Allocate a physical register and add a move in the BB
-          unsigned opVirtualReg = (unsigned) opVal.getAllocatedRegNum();
+          unsigned opVirtualReg = opVal.getAllocatedRegNum();
           unsigned opPhysReg;
           opI = moveUseToReg(opBlock, opI, opVirtualReg, physReg);