[llvm-commits] [llvm] r53263 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp

Dan Gohman gohman at apple.com
Tue Jul 8 16:59:09 PDT 2008


Author: djg
Date: Tue Jul  8 18:59:09 2008
New Revision: 53263

URL: http://llvm.org/viewvc/llvm-project?rev=53263&view=rev
Log:
It's no longer necessary to test if a MachineBasicBlock's
parent is non-null. It now always is.

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

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=53263&r1=53262&r2=53263&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Jul  8 18:59:09 2008
@@ -348,8 +348,7 @@
 /// return null.
 MachineRegisterInfo *MachineInstr::getRegInfo() {
   if (MachineBasicBlock *MBB = getParent())
-    if (MachineFunction *MF = MBB->getParent())
-      return &MF->getRegInfo();
+    return &MBB->getParent()->getRegInfo();
   return 0;
 }
 





More information about the llvm-commits mailing list