Move the decision logic whether it's a good idea to split a critical edge to clients. Also fixed an erroneous check. An edge is only a back edge when the from and to blocks are in the same loop.

llvm-svn: 111256
diff --git a/llvm/lib/CodeGen/PHIElimination.h b/llvm/lib/CodeGen/PHIElimination.h
index f183de6..b054732 100644
--- a/llvm/lib/CodeGen/PHIElimination.h
+++ b/llvm/lib/CodeGen/PHIElimination.h
@@ -13,15 +13,18 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
 
 namespace llvm {
   class LiveVariables;
+  class MachineRegisterInfo;
+  class MachineLoopInfo;
   
   /// Lower PHI instructions to copies.  
   class PHIElimination : public MachineFunctionPass {
-    MachineRegisterInfo  *MRI; // Machine register information
+    MachineRegisterInfo *MRI; // Machine register information
+    MachineLoopInfo     *MLI;
 
   public:
     static char ID; // Pass identification, replacement for typeid