ShortenDeadCopySrcLiveRange needs to be more conservative in multi-kill situations.
[oota-llvm.git] / lib / CodeGen / MachineLoopInfo.cpp
index 9db5967c3ba7f0695c9b2dbb1ba469a3cd2e2855..a5694ae82b0c90ccafb653de90918be8a883cfad 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by Owen Anderson and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
 
 #include "llvm/CodeGen/MachineLoopInfo.h"
 #include "llvm/CodeGen/MachineDominators.h"
-
+#include "llvm/CodeGen/Passes.h"
 using namespace llvm;
 
-TEMPLATE_INSTANTIATION(class LoopBase<MachineBasicBlock>);
-TEMPLATE_INSTANTIATION(class LoopInfoBase<MachineBasicBlock>);
+#define MLB class LoopBase<MachineBasicBlock, MachineLoop>
+TEMPLATE_INSTANTIATION(MLB);
+#undef MLB
+#define MLIB class LoopInfoBase<MachineBasicBlock, MachineLoop>
+TEMPLATE_INSTANTIATION(MLIB);
+#undef MLIB
 
 char MachineLoopInfo::ID = 0;
 static RegisterPass<MachineLoopInfo>
 X("machine-loops", "Machine Natural Loop Construction", true);
 
+const PassInfo *const llvm::MachineLoopInfoID = &X;
+
 bool MachineLoopInfo::runOnMachineFunction(MachineFunction &) {
   releaseMemory();
-  LI->Calculate(getAnalysis<MachineDominatorTree>().getBase());    // Update
+  LI.Calculate(getAnalysis<MachineDominatorTree>().getBase());    // Update
   return false;
 }
 
@@ -36,6 +42,3 @@ void MachineLoopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.setPreservesAll();
   AU.addRequired<MachineDominatorTree>();
 }
-
-// Ensure this file gets linked when MachineLoopInfo.h is used.
-DEFINING_FILE_FOR(MachineLoopInfo)