rename TargetInstrDescriptor -> TargetInstrDesc.
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45695 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp
index 8ab4d4b..0ca10b3 100644
--- a/lib/CodeGen/BranchFolding.cpp
+++ b/lib/CodeGen/BranchFolding.cpp
@@ -349,10 +349,10 @@
                                 MachineBasicBlock::iterator E) {
   unsigned Time = 0;
   for (; I != E; ++I) {
-    const TargetInstrDescriptor *TID = I->getDesc();
-    if (TID->isCall())
+    const TargetInstrDesc &TID = I->getDesc();
+    if (TID.isCall())
       Time += 10;
-    else if (TID->isSimpleLoad() || TID->mayStore())
+    else if (TID.isSimpleLoad() || TID.mayStore())
       Time += 2;
     else
       ++Time;
@@ -778,7 +778,7 @@
 
   MachineInstr *MBB1I = --MBB1->end();
   MachineInstr *MBB2I = --MBB2->end();
-  return MBB2I->getDesc()->isCall() && !MBB1I->getDesc()->isCall();
+  return MBB2I->getDesc().isCall() && !MBB1I->getDesc().isCall();
 }
 
 /// OptimizeBlock - Analyze and optimize control flow related to the specified
@@ -958,7 +958,7 @@
     // If this branch is the only thing in its block, see if we can forward
     // other blocks across it.
     if (CurTBB && CurCond.empty() && CurFBB == 0 && 
-        MBB->begin()->getDesc()->isBranch() && CurTBB != MBB) {
+        MBB->begin()->getDesc().isBranch() && CurTBB != MBB) {
       // This block may contain just an unconditional branch.  Because there can
       // be 'non-branch terminators' in the block, try removing the branch and
       // then seeing if the block is empty.